class_docstr: An abstract class that defines a data source.
class_docstr_tok: ["An","abstract","class","that","defines","a","data","source","."]
code: def __init__(
      self,
      train_ids,
      val_ids,
      use_appearance_id=False,
      use_camera_id=False,
      use_warp_id=False,
      use_depth=False,
      use_relative_depth=False,
      use_time=False,
      random_seed=0,
      train_stride=1,
      val_stride=1,
      preload=True,
      **_,
  ):
      self._train_ids = train_ids
      self._val_ids = val_ids
      self.train_stride = train_stride
      self.val_stride = val_stride
      self.use_appearance_id = use_appearance_id
      self.use_camera_id = use_camera_id
      self.use_warp_id = use_warp_id
      self.use_depth = use_depth
      self.use_time = use_time
      self.use_relative_depth = use_relative_depth
      self.rng = np.random.RandomState(random_seed)
      self.preload = preload
      logging.info(
          "Creating datasource of type %s with use_appearance_id=%s, "
          "use_camera_id=%s, use_warp_id=%s, use_depth=%s, use_time=%s",
          self.__class__.__name__,
          use_appearance_id,
          use_camera_id,
          use_warp_id,
          use_depth,
          use_time,
      )
  
imports: import abc
  import functools
  import itertools
  from typing import Any, Iterable, Optional, Sequence, Union
  from absl import logging
  from flax import jax_utils
  import jax
  import numpy
  import tensorflow
  from nerfies import camera
  from nerfies import gpath
  from nerfies import image_utils
  from nerfies import tf_camera
  from nerfies import utils
  from tensorflow.python.data.util import nest
label_desc: Use image node_id 1 to create a new DataSource object from inherited base classes: abc with example: obj = DataSource(train_ids, val_ids, use_appearance_id, use_camera_id, use_warp_id, use_depth, use_relative_depth, use_time, random_seed, train_stride, val_stride, preload)