code: def reset_max_memory_allocated(
      device: Union[Device, int] = None
  ) -> None:
      r"""Reset the starting point in tracking maximum GPU memory occupied by tensors for a given device.
  
      See :func:`~torch.cuda.max_memory_allocated` for details.
  
      Args:
          device (torch.device or int, optional): selected device. Returns
              statistic for the current device, given by :func:`~torch.cuda.current_device`,
              if :attr:`device` is ``None`` (default).
  
      .. warning::
          This function now calls :func:`~torch.cuda.reset_peak_memory_stats`, which resets
          /all/ peak memory stats.
  
      .. note::
          See :ref:`cuda-memory-management` for more details about GPU memory
          management.
      """
      warnings.warn(
          "torch.cuda.reset_max_memory_allocated now calls torch.cuda.reset_peak_memory_stats, "
          "which resets /all/ peak memory stats.",
          FutureWarning,
      )
      return reset_peak_memory_stats(device=device)
  
imports: import collections
  import contextlib
  import ctypes
  import pickle
  import sys
  import warnings
  from inspect import signature
  from typing import Any, Dict, Optional, Tuple, Union
  import torch
  from torch import _C
  from torch.types import Device
  from .None import _get_device_index, _get_nvml_device_index, _lazy_init, is_initialized
  from ._memory_viz import memory, segments
  from ._utils import _dummy_type
label_desc: Use image node_id 11 for calling a global function with example usage: reset_max_memory_allocated(device) and returns: reset_peak_memory_stats