code: def build_dataset(cfg):
      return DATASETS.build(cfg)
  
imports: import argparse
  import json
  import os.path
  import re
  from pathlib import Path
  from unittest.mock import MagicMock
  import matplotlib.pyplot
  import rich
  import torch.nn
  from mmengine.config import Config, DictAction
  from mmengine.hooks import Hook
  from mmengine.model import BaseModel
  from mmengine.registry import init_default_scope
  from mmengine.runner import Runner
  from mmengine.visualization import Visualizer
  from rich.progress import BarColumn, MofNCompleteColumn, Progress, TextColumn
  from mmocr.registry import DATASETS
label_desc: Use image node_id 4 for calling a global function with example usage: build_dataset(cfg) and returns: DATASETS