docstr: Count the number of occurrences of each operator in the module
docstr_tok: ["Count","the","number","of","occurrences","of","each","operator","in","the","module"]
code: def _count_nodes(mod):
      """Count the number of occurrences of each operator in the module"""
      ret = {}
  
      def visit(node):
          if isinstance(node, relay.expr.Call):
              if hasattr(node.op, "name"):
                  op_name = node.op.name
              else:
                  # Some CallNode may not have 'name' such as relay.Function
                  return
              ret[op_name] = ret.get(op_name, 0) + 1
  
      relay.analysis.post_order_visit(mod["main"], visit)
      return ret
  
imports: import tvm
  import tvm.relay
  from tvm.relay.testing import resnet
  from tvm.contrib.download import download_testdata
  from tvm.relay.build_module import bind_params_by_name
  from tvm.ir.instrument import PassTimingInstrument, pass_instrument
  from pprint import pprint
label_desc: Use image node_id 7 for calling the RelayCallNodeDiffer obj's underlying member method code with example usage: obj._count_nodes(mod) and returns: ret