code: def is_valid_identifier(var: str, allow_unicode: bool = False):
      """Return true if var contains a valid Python identifier
  
      Parameters
      ----------
      val : string
          identifier to check
      allow_unicode : bool (default: False)
          if True, then allow Python 3 style unicode identifiers.
      """
      flags = re.UNICODE if allow_unicode else re.ASCII
      is_valid = re.match(r"^[^\d\W]\w*\Z", var, flags)
      return is_valid and not keyword.iskeyword(var)
  
imports: import keyword
  import re
  import subprocess
  import textwrap
  import urllib
  from typing import Any, Dict, Final, Iterable, List, Optional, Union
  from .schemapi import _resolve_references
label_desc: Use image node_id 2 for calling a global function with example usage: is_valid_identifier(var, allow_unicode) and returns: unknown