class_docstr: Image resize method.
  
  Possible values are:
  
  NEAREST:
    Nearest-neighbor interpolation.
  
  LINEAR:
    `Linear interpolation`_.
  
  LANCZOS3:
    `Lanczos resampling`_, using a kernel of radius 3.
  
  LANCZOS5:
    `Lanczos resampling`_, using a kernel of radius 5.
  
  CUBIC:
    `Cubic interpolation`_, using the Keys cubic kernel.
  
  .. _Linear interpolation: https://en.wikipedia.org/wiki/Bilinear_interpolation
  .. _Cubic interpolation: https://en.wikipedia.org/wiki/Bicubic_interpolation
  .. _Lanczos resampling: https://en.wikipedia.org/wiki/Lanczos_resampling
class_docstr_tok: ["Image","resize","method",".","Possible","values","are",":","NEAREST",":","Nearest-neighbor","interpolation",".","LINEAR",":","`","Linear","interpolation","`","_",".","LANCZOS3",":","`","Lanczos","resampling","`","_",",","using","a","kernel","of","radius","3",".","LANCZOS5",":","`","Lanczos","resampling","`","_",",","using","a","kernel","of","radius","5",".","CUBIC",":","`","Cubic","interpolation","`","_",",","using","the","Keys","cubic","kernel",".","..","_Linear","interpolation",":","https",":","\/\/en.wikipedia.org\/wiki\/Bilinear_interpolation","..","_Cubic","interpolation",":","https",":","\/\/en.wikipedia.org\/wiki\/Bicubic_interpolation","..","_Lanczos","resampling",":","https",":","\/\/en.wikipedia.org\/wiki\/Lanczos_resampling"]
code: def from_string(s: str):
      if s == "nearest":
          return ResizeMethod.NEAREST
      if s in ["linear", "bilinear", "trilinear", "triangle"]:
          return ResizeMethod.LINEAR
      elif s == "lanczos3":
          return ResizeMethod.LANCZOS3
      elif s == "lanczos5":
          return ResizeMethod.LANCZOS5
      elif s in ["cubic", "bicubic", "tricubic"]:
          return ResizeMethod.CUBIC
      else:
          raise ValueError(f'Unknown resize method "{s}"')
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from functools import partial
  import enum
  from typing import Callable
  import numpy
  from jax import jit
  from jax import lax
  from jax import numpy
  from jax._src import core
  from jax._src.util import canonicalize_axis
  from jax._src.numpy.util import promote_dtypes_inexact
label_desc: Use image node_id 1 for calling the ResizeMethod obj's underlying member method code with example usage: obj.from_string(s) and returns: ResizeMethod, ResizeMethod, ResizeMethod, ResizeMethod, ResizeMethod