class_docstr: Request for resources.
  
  This class is used to define a resource request. A resource request comprises one
  or more bundles of resources and instructions on the scheduling behavior.
  
  The resource request can be submitted to a resource manager, which will
  schedule the resources. Depending on the resource backend, this may instruct
  Ray to scale up (autoscaling).
  
  Resource requests are compatible with the most fine-grained low-level resource
  backend, which are Ray placement groups.
  
  Args:
      bundles: A list of bundles which represent the resources requirements.
          E.g. ``[{"CPU": 1, "GPU": 1}]``.
      strategy: The scheduling strategy to acquire the bundles.
  
       - "PACK": Packs Bundles into as few nodes as possible.
       - "SPREAD": Places Bundles across distinct nodes as even as possible.
       - "STRICT_PACK": Packs Bundles into one node. The group is
         not allowed to span multiple nodes.
       - "STRICT_SPREAD": Packs Bundles across distinct nodes.
      *args: Passed to the call of ``placement_group()``, if applicable.
      **kwargs: Passed to the call of ``placement_group()``, if applicable.
class_docstr_tok: ["Request","for","resources",".","This","class","is","used","to","define","a","resource","request",".","A","resource","request","comprises","one","or","more","bundles","of","resources","and","instructions","on","the","scheduling","behavior",".","The","resource","request","can","be","submitted","to","a","resource","manager",",","which","will","schedule","the","resources",".","Depending","on","the","resource","backend",",","this","may","instruct","Ray","to","scale","up","(","autoscaling",")",".","Resource","requests","are","compatible","with","the","most","fine-grained","low-level","resource","backend",",","which","are","Ray","placement","groups",".","Args",":","bundles",":","A","list","of","bundles","which","represent","the","resources","requirements",".","E.g",".","``","[","{","``","CPU","''",":","1",",","``","GPU","''",":","1","}","]","``",".","strategy",":","The","scheduling","strategy","to","acquire","the","bundles",".","-","``","PACK","''",":","Packs","Bundles","into","as","few","nodes","as","possible",".","-","``","SPREAD","''",":","Places","Bundles","across","distinct","nodes","as","even","as","possible",".","-","``","STRICT_PACK","''",":","Packs","Bundles","into","one","node",".","The","group","is","not","allowed","to","span","multiple","nodes",".","-","``","STRICT_SPREAD","''",":","Packs","Bundles","across","distinct","nodes",".","*","args",":","Passed","to","the","call","of","``","placement_group","(",")","``",",","if","applicable",".","*","*","kwargs",":","Passed","to","the","call","of","``","placement_group","(",")","``",",","if","applicable","."]
docstr: Bind the args and kwargs to the `placement_group()` signature.
  
  We bind the args and kwargs, so we can compare equality of two resource
  requests. The main reason for this is that the `placement_group()` API
  can evolve independently from the ResourceRequest API (e.g. adding new
  arguments). Then, `ResourceRequest(bundles, strategy, arg=arg)` should
  be the same as `ResourceRequest(bundles, strategy, arg)`.
docstr_tok: ["Bind","the","args","and","kwargs","to","the","`","placement_group","(",")","`","signature",".","We","bind","the","args","and","kwargs",",","so","we","can","compare","equality","of","two","resource","requests",".","The","main","reason","for","this","is","that","the","`","placement_group","(",")","`","API","can","evolve","independently","from","the","ResourceRequest","API","(","e.g",".","adding","new","arguments",")",".","Then",",","`","ResourceRequest","(","bundles",",","strategy",",","arg=arg",")","`","should","be","the","same","as","`","ResourceRequest","(","bundles",",","strategy",",","arg",")","`","."]
code: def _bind(self):
      """Bind the args and kwargs to the `placement_group()` signature.
  
      We bind the args and kwargs, so we can compare equality of two resource
      requests. The main reason for this is that the `placement_group()` API
      can evolve independently from the ResourceRequest API (e.g. adding new
      arguments). Then, `ResourceRequest(bundles, strategy, arg=arg)` should
      be the same as `ResourceRequest(bundles, strategy, arg)`.
      """
      sig = signature(placement_group)
      try:
          self._bound = sig.bind(
              self._bundles, self._strategy, *self._args, **self._kwargs
          )
      except Exception as exc:
          raise RuntimeError(
              "Invalid definition for resource request. Please check "
              "that you passed valid arguments to the ResourceRequest "
              "object."
          ) from exc
  
imports: import abc
  import json
  from copy import deepcopy
  from inspect import signature
  from typing import Dict, List, Union
  from dataclasses import dataclass
  import ray
  from ray.util import placement_group
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 7 for calling the ResourceRequest obj's underlying member method code with example usage: obj._bind() without return types