class_docstr: Functor for translating Relay programs into Python ASTs.
class_docstr_tok: ["Functor","for","translating","Relay","programs","into","Python","ASTs","."]
docstr: For calls, we must distinguish between ordinary functions,
  operators, and constructor calls.
docstr_tok: ["For","calls",",","we","must","distinguish","between","ordinary","functions",",","operators",",","and","constructor","calls","."]
code: def visit_call(self, call: Expr):
      """For calls, we must distinguish between ordinary functions,
      operators, and constructor calls."""
      func = call.op
      fields, field_defs = self.convert_fields(call.args)
  
      if isinstance(func, tvm.ir.Op):
          raise Exception(
              "Operators should have been lowered and eliminated"
          )
  
      if isinstance(func, relay.Constructor):
          # produce a constructor value
          return (
              self.create_call(
                  "ConstructorValue",
                  [
                      ast.Num(func.tag),
                      ast.List(fields, Load()),
                      NameConstant(None),
                  ],
              ),
              field_defs,
          )
  
      # lowered operator: generate a call to a function that gets the PackedFunc
      # from TVM's registry
      if (
          isinstance(func, Function)
          and func.attrs
          and func.attrs.Primitive.value == 1
      ):
          op_call_def, op_call = self.create_op_call(
              func, call.args, fields
          )
          return (op_call, field_defs + [op_call_def])
  
      # ordinary function
      converted_func, defs = self.visit(func)
      defs += field_defs
      return (ast.Call(converted_func, fields, []), defs)
  
imports: import sys
  import ast
  from ast import alias, Assign, Load, Name, NameConstant, Num, Return, Store, Str
  import re
  import tvm
  from tvm import relay
  from tvm.relay.adt import Pattern
  from tvm.relay.backend import te_compiler
  from tvm.relay.expr import Expr, GlobalVar, Var
  from tvm.relay.function import Function
  from tvm.relay.expr_functor import ExprFunctor
label_desc: Use image node_id 29 for calling the PythonConverter obj's underlying member method code with example usage: obj.visit_call(call) and returns: ast,  defs, self,  field_defs, op_call,  unknown