def get_frame_id(self, frame):
    """Returns the WikiData identifier for a property or entity."""
    if "id" in frame:
      return frame.id
    if "is" in frame:
      if not isinstance(frame["is"], sling.Frame):
        return None
      if "id" in frame["is"]:
        return frame["is"].id
    return None
Returns the WikiData identifier for a property or entity.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py