code: def expand_struct(struct: Union[Column, str]) -> Column:
      """
      Promotes fields of a nested struct to top-level columns similar to using ``struct.*`` from SQL, but can be used in more contexts.
  
      Added in version 0.3.0.
  
      Examples:
          >>> df = spark.createDataFrame([Row(struct=Row(a=1, b=2))])
          >>> df.select(glow.expand_struct(col('struct'))).collect()
          [Row(a=1, b=2)]
  
      Args:
          struct : The struct to expand
  
      Returns:
          Columns corresponding to fields of the input struct
      """
      assert check_argument_types()
      output = Column(
          sc()._jvm.io.projectglow.functions.expand_struct(
              _to_java_column(struct)
          )
      )
      assert check_return_type(output)
      return output
  
imports: from pyspark import SparkContext
  from pyspark.sql.column import Column, _to_java_column, _to_seq
  from typeguard import check_argument_types, check_return_type
  from typing import Union
label_desc: Use image node_id 6 for calling a global function with example usage: expand_struct(struct) and returns: output