code: def maybe_load_model(savedir, container):
      """Load model if present at the specified path."""
      if savedir is None:
          return
  
      state_path = os.path.join(
          os.path.join(savedir, "training_state.pkl.zip")
      )
      if container is not None:
          logger.log("Attempting to download model from Azure")
          found_model = container.get(savedir, "training_state.pkl.zip")
      else:
          found_model = os.path.exists(state_path)
      if found_model:
          state = pickle_load(state_path, compression=True)
          model_dir = "model-{}".format(state["num_iters"])
          if container is not None:
              container.get(savedir, model_dir)
          U.load_state(os.path.join(savedir, model_dir, "saved"))
          logger.log(
              "Loaded models checkpoint at {} iterations".format(
                  state["num_iters"]
              )
          )
          return state
  
imports: import argparse
  import gym
  import numpy
  import os
  import tensorflow
  import tempfile
  import time
  import json
  import random
  import rlattack.common.tf_util
  from rlattack import logger
  from rlattack import deepq
  from rlattack.deepq.replay_buffer import ReplayBuffer, PrioritizedReplayBuffer
  from rlattack.common.misc_util import boolean_flag, pickle_load, pretty_eta, relatively_safe_pickle_dump, set_global_seeds, RunningAvg, SimpleMonitor
  from rlattack.common.schedules import LinearSchedule, PiecewiseSchedule
  from rlattack.common.atari_wrappers_deprecated import wrap_dqn
  from rlattack.common.azure_utils import Container
  from model import model, dueling_model
  from statistics import statistics
label_desc: Use image node_id 4 for calling a global function with example usage: maybe_load_model(savedir, container) and returns: state