code: def _to_snake_case(pascal):
      out = ""
      nupper = 0
      start = 0
      for i, c in enumerate(pascal):
          if c.isupper():
              if nupper == 0:
                  start = i
              nupper += 1
          elif c.islower():
              if nupper == 0:
                  out += c
              else:
                  # do not add another leading underscore
                  if len(out) > 0 and out[-1] != "_":
                      out += "_"
                  if nupper > 1:
                      out += pascal[start : i - 1].lower() + "_"
                  out += pascal[i - 1].lower()
                  out += c
                  nupper = 0
              start = i + 1
          else:
              out += pascal[start : i + 1].lower()
              start = i + 1
              nupper = 0
  
      if nupper > 0:
          if len(out) and out[-1].islower():
              out += "_"
          out += pascal[start:].lower()
      out = _handle_special_case(out)
      return out
  
file_path: DALI/dali/python/nvidia/dali/fn/__init__.py
imports: import sys
  from nvidia.dali import backend
  from nvidia.dali import internal
  from nvidia.dali.external_source import external_source
label_desc: Use image node_id 2 for calling a global function with example usage: _to_snake_case(pascal) and returns: out