code: def _get_key(key, scopes, warn, keep, def_ldel, def_rdel):
      """Get a key from the current scope"""
  
      # If the key is a dot
      if key == ".":
          # Then just return the current scope
          return scopes[0]
  
      # Loop through the scopes
      for scope in scopes:
          try:
              # For every dot seperated key
              for child in key.split("."):
                  # Move into the scope
                  try:
                      # Try subscripting (Normal dictionaries)
                      scope = scope[child]
                  except (TypeError, AttributeError):
                      try:
                          scope = getattr(scope, child)
                      except (TypeError, AttributeError):
                          # Try as a list
                          scope = scope[int(child)]
  
              # Return an empty string if falsy, with two exceptions
              # 0 should return 0, and False should return False
              if scope in (0, False):
                  return scope
  
              try:
                  # This allows for custom falsy data types
                  # https://github.com/noahmorrison/chevron/issues/35
                  if scope._CHEVRON_return_scope_when_falsy:
                      return scope
              except AttributeError:
                  return scope or ""
          except (AttributeError, KeyError, IndexError, ValueError):
              # We couldn't find the key in the current scope
              # We'll try again on the next pass
              pass
  
      # We couldn't find the key in any of the scopes
  
      if warn:
          sys.stderr.write("Could not find key '%s'%s" % (key, linesep))
  
      if keep:
          return "%s %s %s" % (def_ldel, key, def_rdel)
  
      return ""
  
imports: import io
  from os import linesep, path
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: _get_key(key, scopes, warn, keep, def_ldel, def_rdel) and returns: str, scopes, unknown, scope, scope, unknown