class_docstr: A task resource request. This is used in conjunction with the
  :class:`pyspark.resource.ResourceProfile` to programmatically specify the resources
  needed for an RDD that will be applied at the stage level. The amount is specified
  as a float to allow for saying you want more than 1 task per resource. Valid values
  are less than or equal to 0.5 or whole numbers.
  Use :class:`pyspark.resource.TaskResourceRequests` class as a convenience API.
  
  Parameters
  ----------
  resourceName : str
      Name of the resource
  amount : float
      Amount requesting as a float to support fractional resource requests.
      Valid values are less than or equal to 0.5 or whole numbers. This essentially
      lets you configure X number of tasks to run on a single resource,
      ie amount equals 0.5 translates into 2 tasks per resource address.
  
  .. versionadded:: 3.1.0
  
  See Also
  --------
  :class:`pyspark.resource.ResourceProfile`
  
  Notes
  -----
  This API is evolving.
docstr: Returns
  -------
  str
      Amount requesting as a float to support fractional resource requests.
docstr_tok: ["Returns","--","--","--","-","str","Amount","requesting","as","a","float","to","support","fractional","resource","requests","."]
code: def amount(self) -> float:
      """
      Returns
      -------
      str
          Amount requesting as a float to support fractional resource requests.
      """
      return self._amount
  
imports: from typing import overload, Optional, Dict
  from py4j.java_gateway import JavaObject, JVMView
  from pyspark.util import _parse_memory
label_desc: Use image node_id 3 for calling the TaskResourceRequest obj's underlying member method code with example usage: obj.amount() and returns: self