def parse_metadata_resource(resource_map=None):
    """
    Returns the metadata resource found in a PASTA resource map
    """
    metadata_resource = ""
    if resource_map:
        resources = resource_map.split('\n')
        for resource in resources:
            if '/metadata/' in resource:
                metadata_resource = resource
                break
    return metadata_resource