code: def tumor_normal_samples_from_flags(add_flags=True, flags_obj=None):
      """Collects sample-related options into a list of samples."""
      # Sample-specific options.
      tumor_sample_name = make_examples_core.assign_sample_name(
          sample_name_flag=flags_obj.sample_name_tumor,
          reads_filenames=flags_obj.reads_tumor,
      )
  
      normal_sample_name = make_examples_core.assign_sample_name(
          sample_name_flag=flags_obj.sample_name_normal,
          reads_filenames=flags_obj.reads_normal,
      )
  
      tumor_sample_options = deepvariant_pb2.SampleOptions(
          role="tumor",
          name=tumor_sample_name,
          variant_caller_options=make_examples_core.make_vc_options(
              sample_name=tumor_sample_name, flags_obj=flags_obj
          ),
          order=[0, 1],
          pileup_height=dv_constants.PILEUP_DEFAULT_HEIGHT,
      )
      normal_sample_options = deepvariant_pb2.SampleOptions(
          role="normal",
          name=normal_sample_name,
          variant_caller_options=make_examples_core.make_vc_options(
              sample_name=normal_sample_name, flags_obj=flags_obj
          ),
          skip_output_generation=True,
          pileup_height=dv_constants.PILEUP_DEFAULT_HEIGHT,
      )
  
      if add_flags:
          if flags_obj.reads_tumor:
              tumor_sample_options.reads_filenames.extend(
                  flags_obj.reads_tumor.split(",")
              )
          if flags_obj.reads_normal:
              normal_sample_options.reads_filenames.extend(
                  flags_obj.reads_normal.split(",")
              )
  
          if flags_obj.downsample_fraction_tumor != NO_DOWNSAMPLING:
              tumor_sample_options.downsample_fraction = (
                  flags_obj.downsample_fraction_tumor
              )
          if flags_obj.downsample_fraction_normal != NO_DOWNSAMPLING:
              normal_sample_options.downsample_fraction = (
                  flags_obj.downsample_fraction_normal
              )
  
          if flags_obj.pileup_image_height_tumor:
              tumor_sample_options.pileup_height = (
                  flags_obj.pileup_image_height_tumor
              )
          if flags_obj.pileup_image_height_normal:
              normal_sample_options.pileup_height = (
                  flags_obj.pileup_image_height_normal
              )
  
      # Ordering here determines the default order of samples, and when a sample
      # above has a custom .order, then this is the list those indices refer to.
      samples_in_order = [normal_sample_options, tumor_sample_options]
      sample_role_to_train = "tumor"
      return samples_in_order, sample_role_to_train
  
file_path: deepvariant/deepvariant/make_examples_somatic.py
imports: import os
  from absl import app
  from absl import flags
  from deepvariant import dv_constants
  from deepvariant import logging_level
  from deepvariant import make_examples_core
  from deepvariant import make_examples_options
  from deepvariant.protos import deepvariant_pb2
  from third_party.nucleus.io.python import hts_verbose
  from third_party.nucleus.util import errors
  from third_party.nucleus.util import proto_utils
label_desc: Use image node_id 1 for calling a global function with example usage: tumor_normal_samples_from_flags(add_flags, flags_obj) and returns: samples_in_order,  sample_role_to_train