code: def to_interpolate(
      interpolate: Union[Interpolate, str]
  ) -> Union[str]:
      """Expand to a string method for interpolation"""
      if isinstance(interpolate, Interpolate):
          return interpolate.value
      if isinstance(interpolate, str):
          return Interpolate[interpolate.upper()].value
  
      assert isinstance(
          interpolate, (str, Interpolate)
      ), f'Argument "{interpolate}" must be a string or Interpolate'
  
imports: import contextlib
  import functools
  import inspect
  import itertools
  import re
  from numbers import Number
  from typing import Callable, List, Union, Tuple, Iterable, Dict, Pattern, Optional, Sequence
  import jax
  import jax.numpy
  import numpy
  from objax.constants import ConvPadding, Interpolate
  from objax.typing import ConvPaddingInt
label_desc: Use image node_id 10 for calling a global function with example usage: to_interpolate(interpolate) and returns: interpolate, Interpolate