code: def _prepare_seg(self, segment: Text) -> List[MetaTask]:
      if isinstance(self.segments, float):
          train_task_n = int(len(self.meta_task_l) * self.segments)
          if segment == "train":
              return self.meta_task_l[:train_task_n]
          elif segment == "test":
              return self.meta_task_l[train_task_n:]
          else:
              raise NotImplementedError(
                  f"This type of input is not supported"
              )
      else:
          raise NotImplementedError(
              f"This type of input is not supported"
          )
  
imports: import pandas
  import numpy
  from copy import deepcopy
  from joblib import Parallel, delayed
  from typing import Dict, List, Union, Text, Tuple
  from qlib.data.dataset.utils import init_task_handler
  from qlib.data.dataset import DatasetH
  from qlib.contrib.torch import data_to_tensor
  from qlib.model.meta.task import MetaTask
  from qlib.model.meta.dataset import MetaTaskDataset
  from qlib.model.trainer import TrainerR
  from qlib.log import get_module_logger
  from qlib.utils import auto_filter_kwargs, get_date_by_shift, init_instance_by_config
  from qlib.utils.data import deepcopy_basic_type
  from qlib.workflow import R
  from qlib.workflow.task.gen import RollingGen, task_generator
  from qlib.workflow.task.utils import TimeAdjuster
  from tqdm.auto import tqdm
label_desc: Use image node_id 3 for calling the MetaDatasetDS obj's underlying member method code with example usage: obj._prepare_seg(segment) and returns: self, self