code: def _get_value(assign):
      value = assign.value
      if isinstance(value, ast.Num):
          return value.n
      if isinstance(value, ast.Str):
          return value.s
      if isinstance(value, ast.UnaryOp) and isinstance(
          value.op, ast.USub
      ):
          return -value.operand.n
      raise AscconvParseError(f"Unexpected RHS of assignment: {value}")
  
file_path: nibabel/nibabel/nicom/ascconv.py
imports: import ast
  import re
  from collections import OrderedDict
label_desc: Use image node_id 5 for calling a global function with example usage: _get_value(assign) and returns: value, value, unknown