code: def _get_patch_map():
      global _mapping_torch
  
      # decide if generate
      patch_lightning = find_spec("pytorch_lightning") is not None
      patch_torchvision = find_spec("torchvision") is not None
      patch_torch = patch_lightning or patch_torchvision
  
      if patch_torch and _mapping_torch is None:
          _mapping_torch = []
          if patch_lightning:
              import pytorch_lightning
              from bigdl.nano.pytorch import Trainer
  
              _mapping_torch += [
                  [pytorch_lightning, "Trainer", Trainer, None],
              ]
          if patch_torchvision:
              import torchvision
              from bigdl.nano.pytorch.vision import transforms
              from bigdl.nano.pytorch.vision import datasets
  
              _mapping_torch += [
                  [torchvision, "transforms", transforms, None],
                  [torchvision, "datasets", datasets, None],
              ]
  
      if not patch_torch:
          _mapping_torch = []
  
      return _mapping_torch
  
imports: import os
  from importlib.util import find_spec
  from bigdl.nano.pytorch.patching.gpu_cpu import patch_cuda, unpatch_cuda, get_cuda_status
label_desc: Use image node_id 1 for calling a global function with example usage: _get_patch_map() and returns: _mapping_torch