code: def transform(
      operation: str,
      df: DataFrame,
      arg_map: Dict[str, Any] = None,
      **kwargs: Any,
  ) -> DataFrame:
      """
      Apply a named transformation to a DataFrame of genomic data. All parameters apart from the input
      data and its schema are provided through the case-insensitive options map.
  
      There are no bounds on what a transformer may do. For instance, it's legal for a transformer
      to materialize the input DataFrame.
  
      Args:
          operation: Name of the operation to perform
          df: The input DataFrame
          arg_map: A string -> any map of arguments
          kwargs: Named arguments. If the arg_map is not specified, transformer args will be
            pulled from these keyword args.
  
      Example:
          >>> df = spark.read.format('vcf').load('test-data/1kg_sample.vcf')
          >>> piped_df = glow.transform('pipe', df, cmd=["cat"], input_formatter='vcf', output_formatter='vcf', in_vcf_header='infer')
  
      Returns:
          The transformed DataFrame
      """
      assert check_argument_types()
  
      transform_fn = SparkContext._jvm.io.projectglow.Glow.transform
      args = arg_map if arg_map is not None else kwargs
      output_jdf = transform_fn(operation, df._jdf, args)
      output_df = DataFrame(output_jdf, df.sql_ctx)
  
      assert check_return_type(output_df)
      return output_df
  
file_path: glow/python/glow/glow.py
imports: from glow.conversions import OneDimensionalDoubleNumpyArrayConverter, TwoDimensionalDoubleNumpyArrayConverter
  from py4j import protocol
  from py4j.protocol import register_input_converter
  from pyspark import SparkContext
  from pyspark.sql import DataFrame, SQLContext, SparkSession
  from typing import Any, Dict
  from typeguard import check_argument_types, check_return_type
label_desc: Use image node_id 1 for calling a global function with example usage: transform(operation, df, arg_map) and returns: output_df