'Load composite ring metadata.
:param path_to_file: Absolute path to a composite ring JSON file.
:return: an instance of :class:`CompositeRingBuilder`
:raises IOError: if there is a problem opening the file
:raises ValueError: if the file does not contain valid composite ring
metadata'

@classmethod
def load(cls, path_to_file):

    try:
        with open(path_to_file, 'rb') as fp:
            metadata = json.load(fp)
        builder_files = [metadata['component_builder_files'][comp['id']] for comp in metadata['components']]
        builder = CompositeRingBuilder(builder_files)
        builder.components = metadata['components']
        builder.version = metadata['version']
    except (ValueError, TypeError, KeyError):
        raise ValueError('File    does    not    contain    valid    composite    ring    data')
    return builder
