class_docstr: Represents a resource to download, extract, or both.
docstr: Resource constructor.
  
  Args:
    url: `str`, the URL at which to download the resource.
    extract_method: `ExtractMethod` to be used to extract resource. If not
      set, will be guessed from downloaded file name `original_fname`.
    path: `str`, path of resource on local disk. Can be None if resource has
      not be downloaded yet. In such case, `url` must be set.
docstr_tok: ["Resource","constructor",".","Args",":","url",":","`","str","`",",","the","URL","at","which","to","download","the","resource",".","extract_method",":","`","ExtractMethod","`","to","be","used","to","extract","resource",".","If","not","set",",","will","be","guessed","from","downloaded","file","name","`","original_fname","`",".","path",":","`","str","`",",","path","of","resource","on","local","disk",".","Can","be","None","if","resource","has","not","be","downloaded","yet",".","In","such","case",",","`","url","`","must","be","set","."]
code: def __init__(
      self,
      *,
      url: Optional[str] = None,
      extract_method: Optional[ExtractMethod] = None,
      path: Optional[epath.PathLike] = None,
  ):
      """Resource constructor.
  
      Args:
        url: `str`, the URL at which to download the resource.
        extract_method: `ExtractMethod` to be used to extract resource. If not
          set, will be guessed from downloaded file name `original_fname`.
        path: `str`, path of resource on local disk. Can be None if resource has
          not be downloaded yet. In such case, `url` must be set.
      """
      self.url = url
      self.path: epath.Path = (
          epath.Path(path) if path else None
      )  # pytype: disable=annotation-type-mismatch  # attribute-variable-annotations
      self._extract_method = extract_method
  
imports: import base64
  import codecs
  import enum
  import hashlib
  import itertools
  import json
  import os
  import re
  from typing import Any, Optional
  from etils import epath
  from six.moves import urllib
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.download import checksums
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 1 to create a new Resource object from inherited base classes: object with example: obj = Resource()