code: def _check_mode(mode):
      mode = mode.lower()
      enum = mode_enum(mode)
      return enum
  
file_path: scipy/scipy/signal/_upfirdn.py
imports: import numpy
  from ._upfirdn_apply import _output_len, _apply, mode_enum
label_desc: Use image node_id 2 for calling a global function with example usage: _check_mode(mode) and returns: enum