def get_instance_index(label):
    """ gets the instance index from a label

    the label is assumed to be of the form:
        some-text-<num> e.g. 'copy-s3-data-0'
    """
    return_val = None
    try:
        return_val = label.split('-').pop()
        return_val = int(return_val)
    except:
        pass
    return return_val