def _get_dataset_types(self, q):
    types = set()
    if ('product' in q.keys()):
        types.add(self.types.get_by_name(q['product']))
    else:
        types = self.types.get_with_fields(tuple(q.keys()))
        if (not types):
            raise ValueError('No type of dataset has fields: %r', tuple(q.keys()))
    return types
def _get_dataset_types(self, q):
    types = set()
    if ('product' in q.keys()):
        types.add(self.types.get_by_name(q['product']))
    else:
        types = self.types.get_with_fields(tuple(q.keys()))
        if (not types):
            raise ValueError('No type of dataset has fields: %r', tuple(q.keys()))
    return types