code: def _default_schedule_fn(_: int) -> ProfilerAction:
      """
      Default profiler behavior - immediately starts recording the events,
      keeps doing it on every profiler step.
      """
      return ProfilerAction.RECORD
  
imports: import gzip
  import json
  import os
  import tempfile
  from enum import Enum
  from functools import partial
  from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple
  from warnings import warn
  import torch
  import torch.autograd.profiler
  from torch._C import _get_privateuse1_backend_name
  from torch._C._profiler import _add_execution_trace_observer, _disable_execution_trace_observer, _enable_execution_trace_observer, _ExperimentalConfig, _remove_execution_trace_observer
  from torch.autograd import kineto_available, ProfilerActivity
  from torch.profiler._memory_profiler import MemoryProfile, MemoryProfileTimeline
label_desc: Use image node_id 3 for calling a global function with example usage: _default_schedule_fn(_) and returns: ProfilerAction