code: def __getattr__(self, attr):
      if attr in ["__simple_queue", "__current_task"]:
          return self.__dict__.get(attr)
  
      if attr == "put":
  
          def _patched_put(*a_args, **a_kwargs):
              # make sure we flush everything, because after we push the result we will get terminated
              try:
                  if (
                      self.__current_task
                      and self.__current_task.is_main_task()
                  ):
                      self.__current_task.flush(wait_for_uploads=True)
              except:  # noqa
                  pass
              return getattr(self.__simple_queue, "put")(
                  *a_args, **a_kwargs
              )
  
          return _patched_put
  
      return getattr(self.__simple_queue, attr)
  
imports: import os
  from functools import partial
  from time import sleep
  from multiprocessing import pool
  import six
  from ..config import TASK_LOG_ENVIRONMENT, running_remotely, config
  from ..utilities.process.mp import BackgroundMonitor
label_desc: Use image node_id 2 for calling the SimpleQueueWrapper obj's underlying member method code with example usage: obj.__getattr__(attr) and returns: getattr, self, _patched_put, getattr