code: def __init__(self, title, ent_text, ent_type, rel, text):
      # one object corresponds to a data sample
      self.raw_title = title.split()
      self.raw_ent_text = [at_least(x.split()) for x in ent_text]
      assert min([len(x) for x in self.raw_ent_text]) > 0, str(
          self.raw_ent_text
      )
      self.raw_ent_type = ent_type.split()  # <method> .. <>
      self.raw_rel = []
      for r in rel:
          rel_list = r.split()
          for i in range(len(rel_list)):
              if (
                  i > 0
                  and i < len(rel_list) - 1
                  and rel_list[i - 1] == "--"
                  and rel_list[i] != rel_list[i].lower()
                  and rel_list[i + 1] == "--"
              ):
                  self.raw_rel.append(
                      [
                          rel_list[: i - 1],
                          rel_list[i - 1]
                          + rel_list[i]
                          + rel_list[i + 1],
                          rel_list[i + 2 :],
                      ]
                  )
                  break
      self.raw_text = text.split()
      self.graph = self.build_graph()
  
imports: import json
  import pickle
  import random
  import dgl
  import numpy
  import torch
label_desc: Use image node_id 1 to create a new Example object from inherited base classes: object with example: obj = Example(title, ent_text, ent_type, rel, text)