code: def sum_dim_IntList(func, *args, **kwargs):
      # sum_dim_IntList can produce a NT or a T depending on whether the ragged dims
      # are reduced away.
      _, new_kwargs = normalize_function(
          func,
          args=args,
          kwargs=kwargs,
          normalize_to_only_use_kwargs=True,
      )
      inp = new_kwargs.pop("input")
      assert inp._ragged_idx == 1
      new_kwargs["dim"], ragged_reduced_away = _wrap_jagged_dims(
          inp.dim(), new_kwargs["dim"], "sum"
      )
  
      if not ragged_reduced_away:
          return NestedTensor(
              func(inp._values, **new_kwargs), **extract_kwargs(inp)
          )
      else:
          # Don't wrap because we reduced away the raggedness
          out = func(inp._values, **new_kwargs)
          if new_kwargs["keepdim"]:
              out = out.unsqueeze(0)
          return out
  
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 38 for calling a global function with example usage: sum_dim_IntList(func) and returns: NestedTensor, out