code: def draw_deepvariant_pileup(
      example=None,
      channels=None,
      composite_type=None,
      annotated=True,
      labels=None,
      path=None,
      show=True,
      scale=None,
  ):
      """Quick utility for showing a pileup example as channels or RGB.
  
      Args:
        example: A tensorflow Example containing image/encoded and image/shape
          features. Will be parsed through channels_from_example. Ignored if
          channels are provided directly. Either example OR channels is required.
        channels: list of 2D arrays containing the data to draw. Either example OR
          channels is required.
        composite_type: str or None. Method for combining channels. One of
          [None,"RGB"].
        annotated: bool. Whether to add channel labels and mark midpoints.
        labels: list of str. Which labels to add to the image. If annotated=True,
          use default channels labels for DeepVariant.
        path: str. Output file path for saving as an image. If None, just show plot.
        show: bool. Whether to display the image for ipython notebooks. Set to False
          to prevent extra output when running in bulk.
        scale: integer. Multiplier to enlarge the image. Default: None, which will
          set it automatically for a human-readable size. Set to 1 for no scaling.
  
      Returns:
        None. Saves an image at path and optionally shows it with IPython.display.
      """
      if example and not channels:
          channels = channels_from_example(example)
      elif not channels:
          raise ValueError(
              "Either example OR channels must be specified."
          )
  
      if composite_type is None:
          img_array = np.concatenate(channels, axis=1)
          if annotated and labels is None:
              labels = _deepvariant_channel_names(len(channels))
      elif composite_type == "RGB":
          img_array = convert_6_channels_to_rgb(channels)
          if annotated and labels is None:
              labels = [""]  # Creates one midpoint with no label.
      else:
          raise ValueError(
              "Unrecognized composite_type: {}. Must be None or 'RGB'".format(
                  composite_type
              )
          )
  
      array_to_png(
          img_array,
          path=path,
          show=show,
          scale=scale,
          labels=labels,
          vmin=0,
          vmax=254,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import enum
  import math
  from typing import List, NamedTuple, Tuple
  from etils import epath
  from IPython import display
  import numpy
  from PIL import Image
  from PIL import ImageDraw
  from third_party.nucleus.protos import variants_pb2
label_desc: Use image node_id 12 for calling a global function with example usage: draw_deepvariant_pileup(example, channels, composite_type, annotated, labels, path, show, scale) without return types