class_docstr: Class for storing metadata about image samples.
  
  Args:
      size_bytes (None): the size of the image on disk, in bytes
      mime_type (None): the MIME type of the image
      width (None): the width of the image, in pixels
      height (None): the height of the image, in pixels
      num_channels (None): the number of channels in the image
docstr: Builds an :class:`ImageMetadata` object for the given image.
  
  Args:
      img_or_path_or_url: an image, an image path on disk, or a URL
      mime_type (None): the MIME type of the image. If not provided, it
          will be guessed
  
  Returns:
      an :class:`ImageMetadata`
docstr_tok: ["Builds","an",":","class",":","`","ImageMetadata","`","object","for","the","given","image",".","Args",":","img_or_path_or_url",":","an","image",",","an","image","path","on","disk",",","or","a","URL","mime_type","(","None",")",":","the","MIME","type","of","the","image",".","If","not","provided",",","it","will","be","guessed","Returns",":","an",":","class",":","`","ImageMetadata","`"]
code: def build_for(cls, img_or_path_or_url, mime_type=None):
      """Builds an :class:`ImageMetadata` object for the given image.
  
      Args:
          img_or_path_or_url: an image, an image path on disk, or a URL
          mime_type (None): the MIME type of the image. If not provided, it
              will be guessed
  
      Returns:
          an :class:`ImageMetadata`
      """
      if not etau.is_str(img_or_path_or_url):
          return cls._build_for_img(
              img_or_path_or_url, mime_type=mime_type
          )
  
      if img_or_path_or_url.startswith("http"):
          return cls._build_for_url(
              img_or_path_or_url, mime_type=mime_type
          )
  
      return cls._build_for_local(
          img_or_path_or_url, mime_type=mime_type
      )
  
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 the ImageMetadata obj's underlying member method code with example usage: obj.build_for(cls, img_or_path_or_url, mime_type) and returns: cls, cls, cls