nodes: 0, module; 1, function_definition; 2, function_name:pseudoify; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, assert_statement; 8, assert_statement; 9, assert_statement; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, expression_statement; 15, expression_statement; 16, expression_statement; 17, expression_statement; 18, for_statement; 19, expression_statement; 20, expression_statement; 21, return_statement; 22, comment:"""
          Derive a pseudo-feature parent from the given multi-feature.
  
          The provided multi-feature does not need to be the representative. The
          newly created pseudo-feature has the same seqid as the provided multi-
          feature, and spans its entire range. Otherwise, the pseudo-feature is
          empty. It is used only for convenience in sorting.
          """; 23, attribute; 24, attribute; 25, comparison_operator:len(self.multi_rep.siblings) > 0; 26, assignment; 27, assignment; 28, assignment; 29, assignment; 30, assignment; 31, assignment; 32, call; 33, assignment; 34, identifier:sibling; 35, binary_operator:rep.siblings + [rep]; 36, block; 37, assignment; 38, assignment; 39, identifier:parent; 40, identifier:self; 41, identifier:is_toplevel; 42, identifier:self; 43, identifier:is_multi; 44, call; 45, integer:0; 46, identifier:rep; 47, attribute; 48, identifier:start; 49, call; 50, identifier:end; 51, call; 52, identifier:parent; 53, call; 54, attribute; 55, True; 56, attribute; 57, attribute; 58, attribute; 59, argument_list; 60, attribute; 61, attribute; 62, attribute; 63, list; 64, expression_statement; 65, attribute; 66, call; 67, attribute; 68, call; 69, identifier:len; 70, argument_list; 71, identifier:self; 72, identifier:multi_rep; 73, identifier:min; 74, argument_list; 75, identifier:max; 76, argument_list; 77, identifier:Feature; 78, argument_list; 79, identifier:parent; 80, identifier:_pseudo; 81, identifier:parent; 82, identifier:_seqid; 83, identifier:self; 84, identifier:_seqid; 85, identifier:parent; 86, identifier:set_coord; 87, identifier:start; 88, identifier:end; 89, identifier:parent; 90, identifier:_strand; 91, identifier:self; 92, identifier:_strand; 93, identifier:rep; 94, identifier:siblings; 95, identifier:rep; 96, call; 97, identifier:parent; 98, identifier:children; 99, identifier:sorted; 100, argument_list; 101, identifier:rep; 102, identifier:siblings; 103, identifier:sorted; 104, argument_list; 105, attribute; 106, list_comprehension; 107, list_comprehension; 108, None; 109, attribute; 110, argument_list; 111, attribute; 112, attribute; 113, attribute; 114, identifier:siblings; 115, attribute; 116, for_in_clause; 117, attribute; 118, for_in_clause; 119, identifier:parent; 120, identifier:add_child; 121, identifier:sibling; 122, keyword_argument; 123, identifier:parent; 124, identifier:children; 125, identifier:rep; 126, identifier:siblings; 127, identifier:self; 128, identifier:multi_rep; 129, identifier:s; 130, identifier:start; 131, identifier:s; 132, binary_operator:rep.siblings + [rep]; 133, identifier:s; 134, identifier:end; 135, identifier:s; 136, binary_operator:rep.siblings + [rep]; 137, identifier:rangecheck; 138, True; 139, attribute; 140, list; 141, attribute; 142, list; 143, identifier:rep; 144, identifier:siblings; 145, identifier:rep; 146, identifier:rep; 147, identifier:siblings; 148, identifier:rep
code: def pseudoify(self):
          """
          Derive a pseudo-feature parent from the given multi-feature.
  
          The provided multi-feature does not need to be the representative. The
          newly created pseudo-feature has the same seqid as the provided multi-
          feature, and spans its entire range. Otherwise, the pseudo-feature is
          empty. It is used only for convenience in sorting.
          """
          assert self.is_toplevel
          assert self.is_multi
          assert len(self.multi_rep.siblings) > 0
          rep = self.multi_rep
  
          start = min([s.start for s in rep.siblings + [rep]])
          end = max([s.end for s in rep.siblings + [rep]])
  
          parent = Feature(None)
          parent._pseudo = True
          parent._seqid = self._seqid
          parent.set_coord(start, end)
          parent._strand = self._strand
          for sibling in rep.siblings + [rep]:
              parent.add_child(sibling, rangecheck=True)
          parent.children = sorted(parent.children)
          rep.siblings = sorted(rep.siblings)
  
          return parent