docstr: Return a dict which maps the dialect namespace into a list of corresponding operations.
docstr_tok: ["Return","a","dict","which","maps","the","dialect","namespace","into","a","list","of","corresponding","operations","."]
code: def _get_dialect_namespaces(self) -> Dict[str, List[Operation]]:
      """
      Return a dict which maps the dialect namespace into a list of corresponding operations.
      """
      res = defaultdict(list)
  
      def get_dialect_namespaces_block(block):
          for op in list(block.operations):
              for b in op.blocks:
                  get_dialect_namespaces_block(b)
              if hasattr(op, "_dialect_namespace"):
                  dialect_namespace = op._dialect_namespace
                  res[dialect_namespace].append(op)
  
      for func in self.functions.values():
          get_dialect_namespaces_block(func)
      return res
  
imports: from collections import defaultdict
  from typing import Dict, List
  import numpy
  import sympy
  from coremltools import _logger
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from coremltools.converters.mil.input_types import InputType
  from coremltools.converters.mil.mil.input_type import InternalInputType
  from coremltools.converters.mil.mil.ops.helper import _get_version_of_op
  from coremltools.converters.mil.mil.var import ListVar
  from .None import types
  from .block import Function
  from .operation import Operation
  from .types.symbolic import k_num_internal_syms, k_used_symbols
  from .var import Var
label_desc: Use image node_id 4 for calling the Program obj's underlying member method code with example usage: obj._get_dialect_namespaces() and returns: res