class_docstr: This class contains all the functions needed for supporting
  an accelerator family in Ray.
docstr: Validate the resource request quantity of this accelerator resource.
  
  Args:
      quantity: The resource request quantity to be validated.
  
  Returns:
      (valid, error_message) tuple: the first element of the tuple
          indicates whether the given quantity is valid or not,
          the second element is the error message
          if the given quantity is invalid.
docstr_tok: ["Validate","the","resource","request","quantity","of","this","accelerator","resource",".","Args",":","quantity",":","The","resource","request","quantity","to","be","validated",".","Returns",":","(","valid",",","error_message",")","tuple",":","the","first","element","of","the","tuple","indicates","whether","the","given","quantity","is","valid","or","not",",","the","second","element","is","the","error","message","if","the","given","quantity","is","invalid","."]
code: def validate_resource_request_quantity(
      quantity: float,
  ) -> Tuple[bool, Optional[str]]:
      """Validate the resource request quantity of this accelerator resource.
  
      Args:
          quantity: The resource request quantity to be validated.
  
      Returns:
          (valid, error_message) tuple: the first element of the tuple
              indicates whether the given quantity is valid or not,
              the second element is the error message
              if the given quantity is invalid.
      """
  
file_path: ray/python/ray/_private/accelerators/accelerator.py
imports: from abc import ABC, abstractmethod
  from typing import Dict, Optional, List, Tuple
label_desc: Use image node_id 6 for calling the AcceleratorManager obj's underlying member method code with example usage: obj.validate_resource_request_quantity(quantity) without return types