code: def task(
      hyper,
      name,
      train,
      test,
      n_cls,
      steps=None,
      warmup=None,
      lr=None,
      ch=3,
      base_pp="",
      label="label",
      crop=True,
      flip=True,
      h_res=256,
      l_res=224,
  ):
      """Vision task with val and test splits."""
      common = "|value_range(-1, 1)"
      common += f'|onehot({n_cls},key="{label}",key_result="labels")'
      common += '|keep("image", "labels")'
      pp_train = f"decode(channels={ch})|{base_pp}"
      if crop:
          pp_train += f"resize({h_res})|random_crop({l_res})"
      else:
          pp_train += f"resize({l_res})"
      if flip:
          pp_train += "|flip_lr"
      pp_train += common
      pp_eval = (
          f"decode(channels={ch})|{base_pp}resize({l_res})" + common
      )
      pp_eval_resize_crop = (
          f"decode(channels={ch})|{base_pp}resize({h_res})|central_crop({l_res})"
          + common
      )
      pp_eval_resmall_crop = (
          f"decode(channels={ch})|{base_pp}resize_small({h_res})|central_crop({l_res})"
          + common
      )
  
      task_info = [
          fix1(hyper, "dataset_configs.dataset", name),
          fix1(hyper, "dataset_configs.train_split", train),
          fix1(
              hyper,
              "dataset_configs.val_split",
              (
                  ("test", name, test, pp_eval),
                  ("y/test_resize", name, test, pp_eval),
                  (
                      "y/test_resize_crop",
                      name,
                      test,
                      pp_eval_resize_crop,
                  ),
                  (
                      "y/test_resmall_crop",
                      name,
                      test,
                      pp_eval_resmall_crop,
                  ),
              ),
          ),
          fix1(hyper, "dataset_configs.num_classes", n_cls),
          fix1(hyper, "dataset_configs.pp_train", pp_train),
      ]
      schedule = []
      if steps:
          schedule += [
              fix1(hyper, "schedule.all.lr_configs.total_steps", steps)
          ]
          schedule += [
              fix1(
                  hyper,
                  "schedule.all.lr_configs.steps_per_cycle",
                  steps,
              )
          ]
          schedule += [fix1(hyper, "num_training_steps", steps)]
      if warmup:
          schedule += [
              fix1(
                  hyper, "schedule.all.lr_configs.warmup_steps", warmup
              )
          ]
      if lr:
          schedule += [
              fix1(
                  hyper,
                  "schedule.all.lr_configs.base_learning_rate",
                  lr,
              )
          ]
  
      return hyper.zipit(task_info + schedule)
  
imports: import ml_collections
label_desc: Use image node_id 3 for calling a global function with example usage: task(hyper, name, train, test, n_cls, steps, warmup, lr, ch, base_pp, label, crop, flip, h_res, l_res) and returns: hyper