class_docstr: State API Client issues REST GET requests to the server for resource states.
class_docstr_tok: ["State","API","Client","issues","REST","GET","requests","to","the","server","for","resource","states","."]
code: def _make_param(
      cls, options: Union[ListApiOptions, GetApiOptions]
  ) -> Dict:
      options_dict = {}
      for field in fields(options):
          # TODO(rickyyx): We will need to find a way to pass server side timeout
          # TODO(rickyyx): We will have to convert filter option
          # slightly differently for now. But could we do k,v pair rather than this?
          # I see we are also converting dict to XXXApiOptions later on, we could
          # probably organize the marshaling a bit better.
          if field.name == "filters":
              options_dict["filter_keys"] = []
              options_dict["filter_predicates"] = []
              options_dict["filter_values"] = []
              for filter in options.filters:
                  if len(filter) != 3:
                      raise ValueError(
                          f"The given filter has incorrect input type, {filter}. "
                          "Provide (key, predicate, value) tuples."
                      )
                  filter_k, filter_predicate, filter_val = filter
                  options_dict["filter_keys"].append(filter_k)
                  options_dict["filter_predicates"].append(
                      filter_predicate
                  )
                  options_dict["filter_values"].append(filter_val)
              continue
  
          option_val = getattr(options, field.name)
          if option_val is not None:
              options_dict[field.name] = option_val
  
      return options_dict
  
imports: import logging
  import threading
  import urllib
  import warnings
  from contextlib import contextmanager
  from dataclasses import fields
  from typing import Any, Dict, Generator, List, Optional, Tuple, Union
  import requests
  from ray.dashboard.modules.dashboard_sdk import SubmissionClient
  from ray.dashboard.utils import get_address_for_submission_client, ray_address_to_api_server_url
  from ray.util.annotations import DeveloperAPI
  from ray.util.state.common import DEFAULT_LIMIT, DEFAULT_RPC_TIMEOUT, ActorState, ClusterEventState, GetApiOptions, GetLogOptions, JobState, ListApiOptions, NodeState, ObjectState, PlacementGroupState, PredicateType, RuntimeEnvState, StateResource, SummaryApiOptions, SummaryResource, SupportedFilterType, TaskState, WorkerState, dict_to_state
  from ray.util.state.exception import RayStateApiException, ServerUnavailable
label_desc: Use image node_id 2 for calling the StateApiClient obj's underlying member method code with example usage: obj._make_param(cls, options) and returns: options_dict