code: def _initialize_split(
      split_name: str,
      data_directory: Any,
      ds_name: str,
      filetype_suffix: str,
      file_format: file_adapters.FileFormat,
      shard_lengths: Optional[List[int]] = None,
      num_bytes: int = 0,
  ) -> Split:
      """Initializes a split.
  
      Args:
        split_name: name of the split.
        data_directory: directory where the split data will be located.
        ds_name: name of the dataset.
        filetype_suffix: file format.
        file_format: An entry in file_adapters.FileFormat.
        shard_lengths: if the split already has shards, it contains the list of the
          shard lenghts. If None, it assumes that the split is empty.
        num_bytes: number of bytes that have been written already.
  
      Returns:
        A Split.
      """
      if not shard_lengths:
          shard_lengths = []
      filename_template = naming.ShardedFileTemplate(
          dataset_name=ds_name,
          data_dir=data_directory,
          split=split_name,
          filetype_suffix=filetype_suffix,
          template="{DATASET}-{SPLIT}.{FILEFORMAT}-{SHARD_INDEX}",
      )
      return Split(
          info=splits_lib.SplitInfo(
              name=split_name,
              shard_lengths=shard_lengths,
              num_bytes=num_bytes,
              filename_template=filename_template,
          ),
          complete_shards=len(shard_lengths),
          ds_name=ds_name,
          file_format=file_format,
      )
  
imports: from __future__ import annotations
  import dataclasses
  import os
  from typing import Any, Dict, List, Optional
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import example_serializer
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import array_record_module
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: _initialize_split(split_name, data_directory, ds_name, filetype_suffix, file_format, shard_lengths, num_bytes) and returns: Split