code: def load(torch_load):
      def new_load(*args, **kwargs):
          if "map_location" in kwargs:
              kwargs["map_location"] = "cpu"
              return torch_load(*args, **kwargs)
          elif len(args) > 1:
              return torch_load(args[0], "cpu", *args[2:], **kwargs)
          else:
              return torch_load(*args, **kwargs)
  
      return new_load
  
imports: import os
  import torch
  from logging import warning
  from bigdl.nano.utils.pytorch import TORCH_VERSION_LESS_1_10
label_desc: Use image node_id 6 for calling a global function with example usage: load(torch_load) and returns: new_load, torch_load, torch_load, torch_load