def get_evaluation_args(eval_py: str, train_logdir_local: str,
                        dataset_dir_local: str, eval_logdir: str, tfdl_config):
    """Generate the array of arguments needed to run the eval script.

    Args:
         eval_py: The URI of the eval script.
         train_logdir_local: The directory in-which checkpoints can be
              found.
         dataset_dir_local: The directory in which the records are
              found.
         eval_logdir: The directory where evaluation events should be
              logged.
         tfdl_config: google.protobuf.Struct with fields from
            rv.protos.deeplab.train.proto containing TF Deeplab training configuration

    Returns:
         A list of arguments suitable for running the eval script.

    """
    fields = [
        'dataset',
        'output_stride',
        'decoder_output_stride',
        'model_variant',
        'eval_split',
    ]

    multi_fields = [
        'atrous_rates',
        'eval_crop_size',
    ]

    args = ['python', eval_py]

    args.append('--checkpoint_dir={}'.format(train_logdir_local))
    args.append('--eval_logdir={}'.format(eval_logdir))
    args.append('--dataset_dir={}'.format(dataset_dir_local))

    for field in multi_fields:
        for item in tfdl_config.__getattribute__(field):
            args.append('--{}={}'.format(field, item))

    for field in fields:
        field_value = tfdl_config.__getattribute__(field)
        if (not type(field_value) is str) or (not len(field_value) == 0):
            args.append('--{}={}'.format(field, field_value))

    return args