code: def _download_clip(stream, clip_segment, video_path):
      if clip_segment is None:
          clip_segment = (None, None)
  
      start_time, end_time = clip_segment
  
      if start_time is None:
          start_time = 0
  
      if end_time is not None:
          duration = end_time - start_time
      else:
          duration = None
  
      # @todo consider using `fast=True` here, or even using an nearest-keyframe
      # approach to further optimize the clip extraction
      etav.extract_clip(
          stream.url,
          video_path,
          start_time=start_time,
          duration=duration,
      )
  
imports: import importlib
  import itertools
  import logging
  import multiprocessing.dummy
  import os
  import numpy
  import eta.core.utils
  import eta.core.video
  import fiftyone.core.utils
label_desc: Use image node_id 12 for calling a global function with example usage: _download_clip(stream, clip_segment, video_path) without return types