code: def get_definition(self, stmt: Statement,
                         sctx: SchemaContext) -> Tuple[Statement, SchemaContext]:
          
          if stmt.keyword == "uses":
              kw = "grouping"
          elif stmt.keyword == "type":
              kw = "typedef"
          else:
              raise ValueError("not a 'uses' or 'type' statement")
          loc, did = self.resolve_pname(stmt.argument, sctx.text_mid)
          if did == sctx.text_mid:
              dstmt = stmt.get_definition(loc, kw)
              if dstmt:
                  return (dstmt, sctx)
          else:
              dstmt = self.modules[did].statement.find1(kw, loc)
              if dstmt:
                  return (dstmt, SchemaContext(sctx.schema_data, sctx.default_ns, did))
          for sid in self.modules[did].submodules:
              dstmt = self.modules[sid].statement.find1(kw, loc)
              if dstmt:
                  return (
                      dstmt, SchemaContext(sctx.schema_data, sctx.default_ns, sid))
          raise DefinitionNotFound(kw, stmt.argument)
docs: Find the statement defining a grouping or derived type.
  
          Args:
              stmt: YANG "uses" or "type" statement.
              sctx: Schema context where the definition is used.
  
          Returns:
              A tuple consisting of the definition statement ('grouping' or
              'typedef') and schema context of the definition.
  
          Raises:
              ValueError: If `stmt` is neither "uses" nor "type" statement.
              ModuleNotRegistered: If `mid` is not registered in the data model.
              UnknownPrefix: If the prefix specified in the argument of `stmt`
                  is not declared.
              DefinitionNotFound: If the corresponding definition is not found.