'Determine if ancestor_metadata is the same as or a subset of current_metadata for data_managers.'

def compare_data_manager(self, ancestor_metadata, current_metadata):

    def __data_manager_dict_to_tuple_list(metadata_dict):
        return set(sorted([(name, tuple(sorted(value.get('data_tables', []))), value.get('guid'), value.get('version'), value.get('name'), value.get('id')) for (name, value) in metadata_dict.items()]))
    ancestor_metadata = __data_manager_dict_to_tuple_list(ancestor_metadata.get('data_managers', {}))
    current_metadata = __data_manager_dict_to_tuple_list(current_metadata.get('data_managers', {}))
    if ancestor_metadata.issubset(current_metadata):
        if (ancestor_metadata == current_metadata):
            return self.EQUAL
        return self.SUBSET
    return self.NOT_EQUAL_AND_NOT_SUBSET
