code: def _find_domain_getitem(op, lhs_domain, rhs_domain):
      if isinstance(lhs_domain, ArrayType):
          offset = op.defaults["offset"]
          dtype = lhs_domain.dtype
          shape = (
              lhs_domain.shape[:offset] + lhs_domain.shape[1 + offset :]
          )
          return Array[dtype, shape]
      elif isinstance(lhs_domain, ProductDomain):
          # XXX should this return a Union?
          raise NotImplementedError(
              "Cannot statically infer domain from: "
              f"{lhs_domain}[{rhs_domain}]"
          )
  
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 10 for calling a global function with example usage: _find_domain_getitem(op, lhs_domain, rhs_domain) and returns: Array