code: def _is_namedtuple(obj: Any) -> bool:
      # Check if type was created from collections.namedtuple or a typing.NamedTuple.
      return (
          isinstance(obj, tuple)
          and hasattr(obj, "_asdict")
          and hasattr(obj, "_fields")
      )
  
file_path: pytorch/torch/nn/parallel/scatter_gather.py
imports: import torch
  from typing import Any, Dict, List, Optional, Sequence, Tuple, TypeVar, Union, overload
  from ._functions import Scatter, Gather
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: _is_namedtuple(obj) and returns: unknown