code: def _is_named_tuple(
      # pyre-ignore: Missing parameter annotation [2]: Parameter `x` must have a type other than `Any`.
      x: Any,
  ) -> bool:
      return (
          isinstance(x, tuple)
          and hasattr(x, "_asdict")
          and hasattr(x, "_fields")
      )
  
file_path: tnt/torchtnt/utils/memory.py
imports: import time
  from collections import deque
  from contextlib import contextmanager
  from datetime import timedelta
  from enum import Enum
  from threading import Event, Thread
  from typing import Any, Dict, Generator, List, Mapping, Sequence, Tuple
  import psutil
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: _is_named_tuple(x) and returns: unknown