code: def build_dataset(
      path: str,
      dbname: str,
      block_size: int = _DEFAULT_BLOCK_SIZE,
      serializer: Optional[Serializer] = None,
  ):
      """Open the dataset in write mode and returns a writer.
  
      Args:
          path (str): Path to dataset.
          dbname (str): The name of the file to which the data will be written. The `dbname` needs to be unique in this `dataset`.
          block_size (int): Size of each block in bytes. All files in the same dataset should have the same block size. Default: 16MB
  
      Example:
          >>> with build_dataset("/path/to/dataset", "data_part_1") as writer:
          >>>     for i in range(10):
          >>>         writer.write( { "anything you want" } )
      """  # noqa: E501
      return DatasetBuilder(
          path, dbname, block_size=block_size, serializer=serializer
      )
  
imports: import io
  import os
  import struct
  from typing import List, Optional, Set
  import torch
  import bisect
  import bmtrain
  import json
  from .serializer import Serializer, PickleSerializer
  import random
  import string
  import time
label_desc: Use image node_id 5 for calling a global function with example usage: build_dataset(path, dbname, block_size, serializer) and returns: DatasetBuilder