code: def map_transform(self, data: DataEntry, is_train: bool) -> DataEntry:
      data["is_train"] = is_train
      return data
  
imports: import json
  import sys
  from collections import Counter
  from contextlib import contextmanager
  from itertools import islice
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Dict, Any, List
  import numpy
  import pytest
  from toolz import take
  from gluonts.core.component import equals
  from gluonts.dataset.artificial import constant_dataset
  from gluonts.dataset.common import DataEntry, DataBatch, FileDataset
  from gluonts.dataset.field_names import FieldName
  from gluonts.itertools import Cyclic
  from gluonts.dataset.loader import Batch, TrainDataLoader, ValidationDataLoader, InferenceDataLoader, as_stacked_batches
  from gluonts.transform import InstanceSampler, InstanceSplitter, MapTransformation
  from gluonts.testutil.batchify import batchify
label_desc: Use image node_id 1 for calling the WriteIsTrain obj's underlying member method code with example usage: obj.map_transform(data, is_train) and returns: data