code: def _safe_state_dict_filtering(orig_dict, model_dict_keys):
      filtered_orig_dict = {}
      for k, v in orig_dict.items():
          if k in model_dict_keys:
              filtered_orig_dict[k] = v
          else:
              print(f"[ERROR] Failed to load <{k}> in backbone")
      return filtered_orig_dict
  
file_path: carefree-learn/cflearn/api/cv/third_party/iharm/model/modeling/resnetv1b.py
imports: import torch
  import torch.nn
label_desc: Use image node_id 1 for calling a global function with example usage: _safe_state_dict_filtering(orig_dict, model_dict_keys) and returns: filtered_orig_dict