code: def copyStateDict(state_dict):
      if list(state_dict.keys())[0].startswith("module"):
          start_idx = 1
      else:
          start_idx = 0
      new_state_dict = OrderedDict()
      for k, v in state_dict.items():
          name = ".".join(k.split(".")[start_idx:])
          new_state_dict[name] = v
      return new_state_dict
  
file_path: EasyOCR/easyocr/detection.py
imports: import torch
  import torch.backends.cudnn
  from torch.autograd import Variable
  from PIL import Image
  from collections import OrderedDict
  import cv2
  import numpy
  from .craft_utils import getDetBoxes, adjustResultCoordinates
  from .imgproc import resize_aspect_ratio, normalizeMeanVariance
  from .craft import CRAFT
label_desc: Use image node_id 1 for calling a global function with example usage: copyStateDict(state_dict) and returns: new_state_dict