def get_unique_attribute_objects(graph, uniq_attrs):
  """Fetches objects from given scene graph with unique attributes.

  Args:
    graph: Scene graph constructed from the dialog generated so far
    uniq_attrs: List of unique attributes to get attributes

  Returns:
    obj_ids: List of object ids with the unique attributes
  """

  obj_ids = {}
  for obj_id, obj in graph['objects'].items():
    for attr, val in uniq_attrs:
      if obj.get(attr, '') == val:
        # At this point the key should not be present.
        assert (attr, val) not in obj_ids, 'Attributes not unique!'
        obj_ids[(attr, val)] = obj_id
  return obj_ids