code: def _call_once(func):
      """Calls the function only once, regardless of arguments."""
  
      @functools.wraps(func)
      def _wrapper():
          # If we haven't been called yet, actually invoke func and save the result.
          if not _wrapper.has_run():
              _wrapper.mark_as_run()
              _wrapper.return_value = func()
          return _wrapper.return_value
  
      _wrapper._has_run = False
      _wrapper.has_run = lambda: _wrapper._has_run
      _wrapper.mark_as_run = lambda: setattr(_wrapper, "_has_run", True)
      return _wrapper
  
imports: import collections
  from concurrent import futures
  import dataclasses
  import functools
  import signal
  import subprocess
  import threading
  import time
  from typing import Any, Callable, Iterable, List, Mapping, MutableMapping, Optional, Sequence, Tuple
  from absl import logging
  from launchpad import flags
  import psutil
  import termcolor
label_desc: Use image node_id 1 for calling a global function with example usage: _call_once(func) and returns: _wrapper, _wrapper