class_docstr: The mode to use when interacting with the resource
  
  ``Request.Mode`` is a composite of ``Request.ImageMode`` and
  ``Request.IOMode``. The image mode that tells the plugin the desired (and
  expected) image shape and the ``Request.IOMode`` tells the plugin the way
  the resource should be interacted with. For a detailed description of the
  available modes, see the documentation for ``Request.ImageMode`` and
  ``Request.IOMode`` respectively.
  
  Available modes are all combinations of ``Request.IOMode`` and ``Request.ImageMode``:
  
  - read_single_image ("ri")
  - read_multi_image ("rI")
  - read_single_volume ("rv")
  - read_multi_volume ("rV")
  - read_any ("r?")
  - write_single_image ("wi")
  - write_multi_image ("wI")
  - write_single_volume ("wv")
  - write_multi_volume ("wV")
  - write_any ("w?")
  
  Examples
  --------
  >>> Request.Mode("rI")  # a list of simple images should be read from the resource
  >>> Request.Mode("wv")  # a single volume should be written to the resource
class_docstr_tok: ["The","mode","to","use","when","interacting","with","the","resource","``","Request.Mode","``","is","a","composite","of","``","Request.ImageMode","``","and","``","Request.IOMode","``",".","The","image","mode","that","tells","the","plugin","the","desired","(","and","expected",")","image","shape","and","the","``","Request.IOMode","``","tells","the","plugin","the","way","the","resource","should","be","interacted","with",".","For","a","detailed","description","of","the","available","modes",",","see","the","documentation","for","``","Request.ImageMode","``","and","``","Request.IOMode","``","respectively",".","Available","modes","are","all","combinations","of","``","Request.IOMode","``","and","``","Request.ImageMode","``",":","-","read_single_image","(","``","ri","''",")","-","read_multi_image","(","``","rI","''",")","-","read_single_volume","(","``","rv","''",")","-","read_multi_volume","(","``","rV","''",")","-","read_any","(","``","r","?","''",")","-","write_single_image","(","``","wi","''",")","-","write_multi_image","(","``","wI","''",")","-","write_single_volume","(","``","wv","''",")","-","write_multi_volume","(","``","wV","''",")","-","write_any","(","``","w","?","''",")","Examples","--","--","--","--",">",">",">","Request.Mode","(","``","rI","''",")","#","a","list","of","simple","images","should","be","read","from","the","resource",">",">",">","Request.Mode","(","``","wv","''",")","#","a","single","volume","should","be","written","to","the","resource"]
docstr: Enable Mode("r") and Mode("w")
  
  The sunder method ``_missing_`` is called whenever the constructor fails
  to directly look up the corresponding enum value from the given input.
  In our case, we use it to convert the modes "r" and "w" (from the v3
  API) into their legacy versions "r?" and "w?".
  
  More info on _missing_:
  https://docs.python.org/3/library/enum.html#supported-sunder-names
docstr_tok: ["Enable","Mode","(","``","r","''",")","and","Mode","(","``","w","''",")","The","sunder","method","``","_missing_","``","is","called","whenever","the","constructor","fails","to","directly","look","up","the","corresponding","enum","value","from","the","given","input",".","In","our","case",",","we","use","it","to","convert","the","modes","``","r","''","and","``","w","''","(","from","the","v3","API",")","into","their","legacy","versions","``","r","?","''","and","``","w","?","''",".","More","info","on","_missing_",":","https",":","\/\/docs.python.org\/3\/library\/enum.html","#","supported-sunder-names"]
code: def _missing_(cls, value):
      """Enable Mode("r") and Mode("w")
  
      The sunder method ``_missing_`` is called whenever the constructor fails
      to directly look up the corresponding enum value from the given input.
      In our case, we use it to convert the modes "r" and "w" (from the v3
      API) into their legacy versions "r?" and "w?".
  
      More info on _missing_:
      https://docs.python.org/3/library/enum.html#supported-sunder-names
      """
  
      if value == "r":
          return cls("r?")
      elif value == "w":
          return cls("w?")
      else:
          raise ValueError(f"{value} is no valid Mode.")
  
imports: import os
  from io import BytesIO
  import zipfile
  import tempfile
  import shutil
  import enum
  import warnings
  from ..core import urlopen, get_remote_file
  from pathlib import Path
  from urllib.parse import urlparse
  from typing import Optional
label_desc: Use image node_id 1 for calling the Mode obj's underlying member method code with example usage: obj._missing_(cls, value) and returns: cls, cls