code: def compute_sample_metadata(
      sample, overwrite=False, skip_failures=False
  ):
      """Populates the ``metadata`` field of the sample.
  
      Args:
          sample: a :class:`fiftyone.core.sample.Sample`
          overwrite (False): whether to overwrite existing metadata
          skip_failures (False): whether to gracefully continue without raising
              an error if metadata cannot be computed
      """
      if not overwrite and sample.metadata is not None:
          return
  
      sample.metadata = _compute_sample_metadata(
          sample.filepath,
          sample.media_type,
          skip_failures=skip_failures,
      )
      if sample._in_db:
          sample.save()
  
imports: import itertools
  import logging
  import multiprocessing.dummy
  import os
  import requests
  from PIL import Image
  import eta.core.utils
  import eta.core.video
  import fiftyone
  from fiftyone.core.odm import DynamicEmbeddedDocument
  import fiftyone.core.fields
  import fiftyone.core.media
  import fiftyone.core.utils
label_desc: Use image node_id 1 for calling a global function with example usage: compute_sample_metadata(sample, overwrite, skip_failures) without return types