def METHOD_NAME(filename):
    """
    Retrieve the metadata about a bundled library from a python file
    :arg filename: The filename to look inside for the metadata
    :raises ValueError: If we're unable to extract metadata from the file
    :returns: The metadata from the python file
    """
    with open(filename, 'r') as module:
        for line in module:
            if line.strip().startswith('# NOT_BUNDLED'):
                return None
            if line.strip().startswith('# CANT_UPDATE'):
                print(
                    '{0} marked as CANT_UPDATE, so skipping. Manual '
                    'check for CVEs required.'.format(filename))
                return None
            if line.strip().startswith('_BUNDLED_METADATA'):
                data = line[line.index('{'):].strip()
                break
        else:
            raise ValueError('Unable to check bundled library for update.  Please add'
                             ' _BUNDLED_METADATA dictionary to the library file with'
                             ' information on pypi name and bundled version.')
        metadata = json.loads(data)
    return metadata