code: def restart_proxy(self, wait_for_reconnect: bool = True) -> None:
      self.dc.restart_stage("proxy")
      if wait_for_reconnect:
          for _i in range(25):
              agent_data = get_agent_data(conf.make_master_url())
              if (
                  len(agent_data) == 1
                  and agent_data[0]["enabled"] is True
                  and agent_data[0]["draining"] is False
              ):
                  break
              time.sleep(1)
          else:
              pytest.fail(f"Agent didn't reconnect after {_i} seconds")
  
imports: import json
  import os
  import subprocess
  import time
  from typing import Any, Dict, Iterator, List, Union, cast
  import pytest
  from tests import config
  from .abstract_cluster import Cluster
  from .test_users import logged_in_user
  from .utils import now_ts, set_master_port
label_desc: Use image node_id 10 for calling the ManagedCluster obj's underlying member method code with example usage: obj.restart_proxy(wait_for_reconnect) without return types