code: def cat_default(func, *args, **kwargs):
      _, new_kwargs = normalize_function(
          func,
          args=args,
          kwargs=kwargs,
          normalize_to_only_use_kwargs=True,
      )
  
      tensors = new_kwargs.pop("tensors")
  
      # Convert any non-nested to nested
      nested = [t for t in tensors if t.is_nested]
      assert len(nested) > 0
      first = nested[0]
      tensors = [
          t if t.is_nested else t.expand_as(first) for t in tensors
      ]
  
      # Account for collapsed jagged dim
      dim = new_kwargs["dim"]
      new_kwargs["dim"] = _wrap_jagged_dim(len(first.shape), dim, "cat")
  
      return NestedTensor(
          func([t._values for t in tensors], **new_kwargs),
          **extract_kwargs(tensors[0]),
      )
  
imports: import functools
  import math
  import operator
  import torch
  from torch.nested._internal.sdpa import jagged_scaled_dot_product_attention
  from .nested_tensor import NestedTensor
  from typing import *
  from torch.fx.operator_schemas import normalize_function
label_desc: Use image node_id 30 for calling a global function with example usage: cat_default(func) and returns: NestedTensor