code: def _find_domain_cat(op, parts):
      dim = op.defaults["axis"]
      if dim >= 0:
          event_dims = {len(x.shape) for x in parts}
          assert len(event_dims) == 1, "undefined"
          dim = dim - next(iter(event_dims))
      assert dim < 0
      shape = broadcast_shape(*(x.shape[:dim] for x in parts))
      shape += (sum(x.shape[dim] for x in parts),)
      if dim < -1:
          shape += broadcast_shape(*(x.shape[dim + 1 :] for x in parts))
      output = Array[parts[0].dtype, shape]
      return output
  
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 21 for calling a global function with example usage: _find_domain_cat(op, parts) and returns: output