function getPartSize(objMD, partNumber) {
    let size;
    let locationPartNumber;
    if (partNumber && objMD && objMD.location
        && objMD.location.length >= partNumber) {
        const locations = [];
        for (let i = 0; i < objMD.location.length; i++) {
            const { dataStoreETag } = objMD.location[i];
            if (dataStoreETag) {
                locationPartNumber =
                    Number.parseInt(dataStoreETag.split(':')[0], 10);
            } else {
                /**
                 * Location objects prior to GA7.1 do not include the
                 * dataStoreETag field so we cannot find the part range,
                 * the objects are treated as if they only have 1 part
                 */
                locationPartNumber = 1;
            }
            // Get all parts that belong to the requested part number
            if (partNumber === locationPartNumber) {
                locations.push(objMD.location[i]);
            } else if (locationPartNumber > partNumber) {
                break;
            }
        }
        if (locations.length > 0) {
            const { start } = locations[0];
            const endLocation = locations[locations.length - 1];
            const end = endLocation.start + endLocation.size - 1;
            size = end - start + 1;
        }
    }
    return size;
}
Gets the size of the requested part of the object
@param {object} objMD - object metadata
@param {object} partNumber - part number
@return {(Integer|undefined)} - size of the part or undefined