code: def rad_fn(x, pos=None):
      if x >= 0:
          n = int((x / np.pi) * 2.0 + 0.25)
      else:
          n = int((x / np.pi) * 2.0 - 0.25)
  
      if n == 0:
          return "0"
      elif n == 1:
          return r"$\pi/2$"
      elif n == 2:
          return r"$\pi$"
      elif n == -1:
          return r"$-\pi/2$"
      elif n == -2:
          return r"$-\pi$"
      elif n % 2 == 0:
          return rf"${n//2}\pi$"
      else:
          return rf"${n}\pi/2$"
  
imports: import math
  from packaging.version import parse
  import numpy
  import matplotlib.ticker
  import matplotlib.units
label_desc: Use image node_id 1 for calling a global function with example usage: rad_fn(x, pos) and returns: str, str, str, str, str, str, unknown, str, str, n, str