docstr: Returns the averager's current expiration time, which is used to send join requests to leaders
docstr_tok: ["Returns","the","averager","'s","current","expiration","time",",","which","is","used","to","send","join","requests","to","leaders"]
code: def get_request_expiration_time(self) -> float:
      """Returns the averager's current expiration time, which is used to send join requests to leaders"""
      if isfinite(self.potential_leaders.declared_expiration_time):
          return self.potential_leaders.declared_expiration_time
      else:
          scheduled_time = max(
              self.step_control.scheduled_time,
              get_dht_time() + self.min_matchmaking_time,
          )
          return min(
              scheduled_time, self.potential_leaders.search_end_time
          )
  
imports: from __future__ import annotations
  import asyncio
  import concurrent.futures
  import contextlib
  import random
  from math import isfinite
  from typing import AsyncIterator, Dict, Optional, Set, Tuple, Type
  from hivemind.averaging.control import StepControl
  from hivemind.averaging.group_info import GroupInfo
  from hivemind.averaging.key_manager import GroupKey, GroupKeyManager
  from hivemind.dht import DHT, DHTID
  from hivemind.p2p import P2P, P2PContext, P2PDaemonError, P2PHandlerError, PeerID, ServicerBase
  from hivemind.proto import averaging_pb2
  from hivemind.utils import DHTExpiration, TimedStorage, get_dht_time, get_logger, timed_storage
  from hivemind.utils.asyncio import anext, cancel_and_wait
label_desc: Use image node_id 4 for calling the Matchmaking obj's underlying member method code with example usage: obj.get_request_expiration_time() and returns: self, min