class_docstr: Superclass for cluster objects
  
  This class contains common functionality for Dask Cluster manager classes.
  
  To implement this class, you must provide
  
  1.  A ``scheduler_comm`` attribute, which is a connection to the scheduler
      following the ``distributed.core.rpc`` API.
  2.  Implement ``scale``, which takes an integer and scales the cluster to
      that many workers, or else set ``_supports_scaling`` to False
  
  For that, you should get the following:
  
  1.  A standard ``__repr__``
  2.  A live IPython widget
  3.  Adaptive scaling
  4.  Integration with dask-labextension
  5.  A ``scheduler_info`` attribute which contains an up-to-date copy of
      ``Scheduler.identity()``, which is used for much of the above
  6.  Methods to gather logs
class_docstr_tok: ["Superclass","for","cluster","objects","This","class","contains","common","functionality","for","Dask","Cluster","manager","classes",".","To","implement","this","class",",","you","must","provide","1",".","A","``","scheduler_comm","``","attribute",",","which","is","a","connection","to","the","scheduler","following","the","``","distributed.core.rpc","``","API",".","2",".","Implement","``","scale","``",",","which","takes","an","integer","and","scales","the","cluster","to","that","many","workers",",","or","else","set","``","_supports_scaling","``","to","False","For","that",",","you","should","get","the","following",":","1",".","A","standard","``","__repr__","``","2",".","A","live","IPython","widget","3",".","Adaptive","scaling","4",".","Integration","with","dask-labextension","5",".","A","``","scheduler_info","``","attribute","which","contains","an","up-to-date","copy","of","``","Scheduler.identity","(",")","``",",","which","is","used","for","much","of","the","above","6",".","Methods","to","gather","logs"]
docstr: Return client for the cluster
  
  If a client has already been initialized for the cluster, return that
  otherwise initialize a new client object.
code: def get_client(self):
      """Return client for the cluster
  
      If a client has already been initialized for the cluster, return that
      otherwise initialize a new client object.
      """
      from distributed.client import Client
  
      try:
          current_client = Client.current()
          if current_client and current_client.cluster == self:
              return current_client
      except ValueError:
          pass
      return Client(self)
  
imports: from __future__ import annotations
  import asyncio
  import datetime
  import logging
  import uuid
  import warnings
  from contextlib import suppress
  from typing import Any
  from packaging.version import parse
  from tornado.ioloop import IOLoop
  import dask.config
  from dask.utils import _deprecated, format_bytes, parse_timedelta, typename
  from dask.widgets import get_template
  from distributed.compatibility import PeriodicCallback
  from distributed.core import Status
  from distributed.deploy.adaptive import Adaptive
  from distributed.metrics import time
  from distributed.objects import SchedulerInfo
  from distributed.utils import Log, Logs, LoopRunner, NoOpAwaitable, SyncMethodMixin, format_dashboard_link, log_errors
label_desc: Use image node_id 15 for calling the Cluster obj's underlying member method code with example usage: obj.get_client() and returns: Client, current_client