code: def _create_metadata(
      video: NestedDict, height: int, width: int, num_frames: int
  ) -> NestedDict:
      """Creates the metadata entry for a video."""
      metadata = {}
      metadata["height"] = height or video["height"]
      metadata["width"] = width or video["width"]
      metadata["num_frames"] = num_frames
      metadata["video_name"] = video["file_names"][0].split("/")[0]
      return metadata
  
imports: from __future__ import annotations
  import collections
  import json
  import os
  from typing import Any, Dict, List, Optional, Tuple, Union
  from etils import epath
  import numpy
  import tensorflow_datasets.public_api
label_desc: Use image node_id 5 for calling a global function with example usage: _create_metadata(video, height, width, num_frames) and returns: metadata