code: def is_batch_first(expanded_args_and_kwargs):
      batch_first = None
      for arg in expanded_args_and_kwargs:
          if not isinstance(arg, ExpandedWeight):
              continue
  
          if not batch_first:
              batch_first = arg.batch_first
          elif arg.batch_first != batch_first:
              raise RuntimeError(
                  "Got conflicting batch_first arguments in the same layer"
              )
      return batch_first
  
file_path: pytorch/torch/nn/utils/_expanded_weights/expanded_weights_utils.py
imports: from typing import Optional
  import torch
  from .expanded_weights_impl import ExpandedWeight
label_desc: Use image node_id 1 for calling a global function with example usage: is_batch_first(expanded_args_and_kwargs) and returns: batch_first