code: def create_glyphazzn_dataset(filepattern, output_path):
      """Creates a glyphazzn dataset, from raw Parquetio to TFRecords."""
  
      def pipeline(root):
          """Pipeline for creating glyphazzn dataset."""
          attrs = ["uni", "width", "vwidth", "sfd", "id", "binary_fp"]
  
          examples = root | "Read" >> beam.io.parquetio.ReadFromParquet(
              file_pattern=filepattern, columns=attrs
          )
  
          examples = examples | "FilterBadIcons" >> beam.Filter(
              _is_valid_glyph
          )
          examples = examples | "ConvertToPath" >> beam.Map(
              _convert_to_path
          )
          examples = examples | "FilterBadPathLenghts" >> beam.Filter(
              _is_valid_path
          )
          examples = examples | "ProcessAndConvert" >> beam.Map(
              _create_example
          )
          (
              examples
              | "WriteToTFRecord"
              >> beam.io.tfrecordio.WriteToTFRecord(
                  output_path, num_shards=90
              )
          )
  
      return pipeline
  
imports: from absl import app
  from absl import flags
  import apache_beam
  from magenta.models.svg_vae import svg_utils
  import numpy
  from tensor2tensor.data_generators import generator_utils
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling a global function with example usage: create_glyphazzn_dataset(filepattern, output_path) and returns: pipeline