class_docstr: TODO(klausg): documentation.
class_docstr_tok: ["TODO","(","klausg",")",":","documentation","."]
docstr: Generates a train/test split for the asset source.
  
  Args:
    fraction: the fraction of the asset source to use for the held-out set.
  
  Returns:
    train_ids: list of asset ID strings
    test_ids: list of asset ID strings
docstr_tok: ["Generates","a","train\/test","split","for","the","asset","source",".","Args",":","fraction",":","the","fraction","of","the","asset","source","to","use","for","the","held-out","set",".","Returns",":","train_ids",":","list","of","asset","ID","strings","test_ids",":","list","of","asset","ID","strings"]
code: def get_test_split(self, fraction=0.1):
      """
      Generates a train/test split for the asset source.
  
      Args:
        fraction: the fraction of the asset source to use for the held-out set.
  
      Returns:
        train_ids: list of asset ID strings
        test_ids: list of asset ID strings
      """
      rng = np.random.default_rng(42)
      test_size = int(round(len(self.all_asset_ids) * fraction))
      test_ids = rng.choice(
          self.all_asset_ids, size=test_size, replace=False
      )
      train_ids = [i for i in self.all_asset_ids if i not in test_ids]
      return train_ids, test_ids
  
imports: import difflib
  import functools
  import logging
  import pathlib
  import shutil
  import tarfile
  import tempfile
  import numpy
  import tensorflow
  from typing import Optional, Dict, Any, Type
  import weakref
  from kubric import core
  from kubric import file_io
  from kubric.kubric_typing import PathLike
label_desc: Use image node_id 14 for calling the AssetSource obj's underlying member method code with example usage: obj.get_test_split(fraction) and returns: train_ids,  test_ids