code: def convert_bgr2rgb(state_dict):
      w = state_dict["conv1_w"]  # (64, 3, 7, 7)
      assert w.shape == (64, 3, 7, 7), "Error in converting bgr2rgb"
      w = w[:, ::-1, :, :]
      state_dict["conv1_w"] = w.copy()
      logger.info("BGR ===> RGB for conv1_w.")
      return state_dict
  
file_path: vissl/extra_scripts/convert_caffe2_to_torchvision_resnet.py
imports: import argparse
  import logging
  import pickle
  import re
  import sys
  from collections import OrderedDict
  import torch
  from iopath.common.file_io import g_pathmgr
label_desc: Use image node_id 5 for calling a global function with example usage: convert_bgr2rgb(state_dict) and returns: state_dict