code: def syntax_error_check(expr):
      if not expr:
          return
      expr = strip_query(expr)
      try:
          compile_restricted(
              expr, filename="<inline code>", mode="eval"
          )
      except SyntaxError:
          compile(expr, filename="<inline code>", mode="eval")
  
imports: import logging
  from abc import abstractmethod
  from functools import lru_cache
  from datetime import datetime, timedelta
  from RestrictedPython import safe_builtins, utility_builtins, limited_builtins, compile_restricted
  from RestrictedPython.Eval import default_guarded_getitem
  from RestrictedPython.Guards import full_write_guard, guarded_iter_unpack_sequence, guarded_unpack_sequence
label_desc: Use image node_id 4 for calling a global function with example usage: syntax_error_check(expr) without return types