code: def load_obo_file(self, obo_file, optional_attrs, load_obsolete, prt):
          
          reader = OBOReader(obo_file, optional_attrs)
  
          # Save alt_ids and their corresponding main GO ID. Add to GODag after populating GO Terms
          alt2rec = {}
          for rec in reader:
              # Save record if:
              #   1) Argument load_obsolete is True OR
              #   2) Argument load_obsolete is False and the GO term is "live" (not obsolete)
              if load_obsolete or not rec.is_obsolete:
                  self[rec.item_id] = rec
                  for alt in rec.alt_ids:
                      alt2rec[alt] = rec
  
          # Save the typedefs and parsed optional_attrs
          # self.optobj = reader.optobj
          self.typedefs = reader.typedefs
  
          self._populate_terms(reader.optobj)
          self._set_level_depth(reader.optobj)
  
          # Add alt_ids to go2obj
          for goid_alt, rec in alt2rec.items():
              self[goid_alt] = rec
          desc = self._str_desc(reader)
          if prt is not None:
              prt.write("{DESC}\n".format(DESC=desc))
          return desc
docs: Read obo file. Store results.