code: def from_shard(shard, pipeline):
      # We import webdataset here so that it desn't crash if it's not required
      # (Webdataset is an optional depdency)
      from webdataset import WebDataset
  
      dataset = WebDataset(shard)
      dataset = pipeline(dataset)
      return dataset
  
imports: from functools import partial
  from typing import Callable, List, Mapping
  from os import SEEK_END, path
  import numpy
  from time import sleep
  import ctypes
  from multiprocessing import shared_memory, cpu_count, Queue, Process, Value
  from tqdm import tqdm
  from tqdm.contrib.concurrent import thread_map
  from .utils import chunks, is_power_of_2
  from .fields.base import Field
  from .memory_allocator import MemoryAllocator
  from .types import TYPE_ID_HANDLER, get_metadata_type, HeaderType, FieldDescType, CURRENT_VERSION, ALLOC_TABLE_TYPE
label_desc: Use image node_id 1 for calling a global function with example usage: from_shard(shard, pipeline) and returns: dataset