human
I wrote the below code

    def input_fn():
        "Supplies    input    to    our    model.\n\n                This    function    supplies    input    to    our    model,    where    this    input    is    a\n                function    of    the    mode.    For    example,    we    supply    different    data    if\n                we're    performing    training    versus    evaluation.\n\n                Returns:\n                        A    tuple    consisting    of    1)    a    dictionary    of    tensors    whose    keys    are\n                        the    feature    names,    and    2)    a    tensor    of    target    labels    if    the    mode\n                        is    not    INFER    (and    None,    otherwise).\n\n                Raises:\n                        ValueError:    if    one    of    the    parameters    has    an    unsupported    value.\n                "
        (problem_count, batches) = (len(hparams.problems), [])
        with tf.name_scope('input_reader'):
            for n in xrange(problem_count):
                if ((fixed_problem is not None) and (n != fixed_problem)):
                    continue
                problem_instance = hparams.problem_instances[n]
                p_hparams = hparams.problems[n]
                with tf.name_scope(('problem_%d' % n)):
                    with tf.device('/cpu:0'):
                        capacity = p_hparams.max_expected_batch_size_per_shard
                        capacity *= num_datashards
                        examples = data_reader.input_pipeline(problem_instance, (data_file_patterns and data_file_patterns[n]), capacity, mode, hparams)
                        feature_map = data_reader.batch_examples(examples, data_reader.hparams_to_batching_scheme(hparams, shard_multiplier=num_datashards, drop_long_sequences=((mode == tf.contrib.learn.ModeKeys.TRAIN) or hparams.eval_drop_long_sequences), length_multiplier=p_hparams.batch_size_multiplier))
                if (problem_instance is not None):
                   ...

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def build_input_fn(mode, hparams, data_file_patterns=None, num_datashards=None, fixed_problem=None, worker_replicas=None, worker_id=None):