code: def second_textx_model(self, model_parser):
          
  
          if self.grammar_parser.debug:
              self.grammar_parser.dprint("RESOLVING MODEL PARSER: second_pass")
  
          self._resolve_rule_refs(self.grammar_parser, model_parser)
          self._determine_rule_types(model_parser.metamodel)
          self._resolve_cls_refs(self.grammar_parser, model_parser)
  
          return model_parser
docs: Cross reference resolving for parser model.