code: def _outer_to_inner_dim(ndim, dim):
      assert dim >= 0 and dim < ndim
      return 0 if dim < 2 else dim - 1
  
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 1 for calling a global function with example usage: _outer_to_inner_dim(ndim, dim) and returns: unknown