code: def schema_id(connection, schema_name=None):
      """Fetch the id for schema"""
      cur = connection.cursor()
      if schema_name is None:
          cur.execute("SELECT current_schema")
          schema_name = cur.fetchall()[0][0]
  
      query = f"""
                  SELECT id
                  FROM sys.schemas
                  WHERE name = '{schema_name}'
              """
  
      cur.execute(query)
  
      try:
          schema_id = cur.fetchall()[0][0]
      except:
          raise exc.InvalidRequestError(schema_name)
  
      return schema_id
  
label_desc: Use image node_id 1 for calling a global function with example usage: schema_id(connection, schema_name) and returns: schema_id