code: def str_to_interp_mode(mode_str):
      if has_interpolation_mode:
          return _str_to_torch_interpolation[mode_str]
      else:
          return _str_to_pil_interpolation[mode_str]
  
imports: import math
  import numbers
  import random
  import warnings
  from typing import List, Sequence, Tuple, Union
  import torch
  import torchvision.transforms.functional
  from PIL import Image
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: str_to_interp_mode(mode_str) and returns: _str_to_torch_interpolation, _str_to_pil_interpolation