class_docstr: Mixin for common async logic
class_docstr_tok: ["Mixin","for","common","async","logic"]
docstr: Get event loop
  
  Notice if event loop has changed,
  and register init_io_state on activation of a new event loop
code: def _get_loop(self) -> Any:
      """Get event loop
  
      Notice if event loop has changed,
      and register init_io_state on activation of a new event loop
      """
      if self._current_loop is None:
          self._current_loop = self._default_loop()
          self._init_io_state(self._current_loop)
          return self._current_loop
      current_loop = self._default_loop()
      if current_loop is not self._current_loop:
          # warn? This means a socket is being used in multiple loops!
          self._current_loop = current_loop
          self._init_io_state(current_loop)
      return current_loop
  
imports: import warnings
  from asyncio import Future
  from collections import deque
  from itertools import chain
  from typing import Any, Awaitable, Callable, Dict, List, NamedTuple, Optional, Tuple, Type, TypeVar, Union, cast, overload
  import zmq
  from zmq import EVENTS, POLLIN, POLLOUT
  from zmq._typing import Literal
label_desc: Use image node_id 1 for calling the _Async obj's underlying member method code with example usage: obj._get_loop() and returns: current_loop, self