code: def _find_domain_astype(op, domain):
      if op.defaults["dtype"] in (
          "float",
          "double",
          "float32",
          "float64",
      ):
          dtype = "real"
      elif op.defaults["dtype"] in ("bool"):
          dtype = 2
      elif op.defaults["dtype"] in (
          "int",
          "int8",
          "int16",
          "int32",
          "int64",
          "uint8",
      ):
          dtype = domain.dtype
      else:
          raise NotImplementedError
      return Array[dtype, domain.shape]
  
imports: import copyreg
  import functools
  import inspect
  import operator
  import warnings
  from functools import reduce
  from weakref import WeakValueDictionary
  import funsor.ops
  from funsor.ops.builtin import parse_ellipsis, parse_slice
  from funsor.util import broadcast_shape, get_backend, get_tracing_state, quote
label_desc: Use image node_id 6 for calling a global function with example usage: _find_domain_astype(op, domain) and returns: Array