# Path: pyphysim/cell/shapes.py
#     _MATPLOTLIB_AVAILABLE = True
#     _MATPLOTLIB_AVAILABLE = False
#         A = self.pos.real
#         B = np.exp(1j * angle_rad).real
#         C = self.pos.imag
#         D = np.exp(1j * angle_rad).imag
#         A = self._lower_coord - self.pos
#         B = self._upper_coord - self.pos
#     POINT1 = h.get_border_point(90, 0.9)
#     POINT2 = h.get_border_point(10, 0.9)
#     POINT3 = h.get_border_point(30, 0.9)
#     POINT4 = h.get_border_point(107, 1)
# class Coordinate:
# class Shape(Coordinate):
# class Hexagon(Shape):
# class Rectangle(Shape):
# class Circle(Shape):
#     def __init__(self, pos: complex, **kwargs: Any) -> None:
#     def pos(self) -> complex:
#     def pos(self, value: complex) -> None:
#     def calc_dist(self, other: "Coordinate") -> float:
#     def move_by_relative_coordinate(self, rel_pos: complex) -> None:
#     def move_by_relative_polar_coordinate(self, radius: float,
#                                           angle: float) -> None:
#     def __repr__(self) -> str:  # pragma: no cover
#     def __init__(self,
#                  pos: complex,
#                  radius: float,
#                  rotation: float = 0,
#                  **kwargs: Any) -> None:
#     def __repr__(self) -> str:  # pragma: no cover
#     def radius(self) -> float:
#     def radius(self, value: float) -> None:
#     def rotation(self) -> float:
#     def rotation(self, value: float) -> None:
#     def _get_vertex_positions(self) -> np.ndarray:  # pragma: no cover
#     def vertices_no_trans_no_rotation(self) -> np.ndarray:  # pragma: no cover
#     def vertices(self) -> np.ndarray:
#     def is_point_inside_shape(self, point: complex) -> bool:
#     def get_border_point(
#             self,
#             angle: float,
#             ratio: Optional[float] = None) -> complex:  # pylint: disable=R0914
#     def plot(self, ax: Any = None) -> None:  # pragma: no cover
#     def _repr_some_format_(
#             self,
#             extension: str = 'png',
#             axis_option: str = 'equal') -> Any:  # pragma: nocover
#     def _repr_png_(self) -> Any:  # pragma: no cover
#     def _repr_svg_(self) -> Any:  # pragma: no cover
#     def calc_rotated_pos(cur_pos: ComplexOrArray,
#                          angle: float) -> ComplexOrArray:
#     def __init__(self,
#                  pos: complex,
#                  radius: float,
#                  rotation: float = 0,
#                  **kwargs: Any) -> None:
#     def height(self) -> float:
#     def _get_vertex_positions(self) -> np.ndarray:
#     def __init__(self,
#                  first: complex,
#                  second: complex,
#                  rotation: float = 0,
#                  **kwargs: Any) -> None:
#     def __repr__(self) -> str:  # pragma: no cover
#     def _get_vertex_positions(self) -> np.ndarray:
#     def _repr_some_format_(
#             self,
#             extension: str = 'png',
#             axis_option: str = 'tight') -> Any:  # pragma: no cover
#     def is_point_inside_shape(self, point: complex) -> bool:
#     def __init__(self, pos: complex, radius: float):
#     def _get_vertex_positions(self) -> np.ndarray:
#     def get_border_point(self,
#                          angle: float,
#                          ratio: Optional[float] = None) -> complex:
#     def is_point_inside_shape(self, point: complex) -> bool:
#     def plot(self, ax: Any = None) -> None:  # pragma: no cover
# def from_complex_array_to_real_matrix(a: np.ndarray) -> np.ndarray:


    from matplotlib import patches
    from matplotlib import pyplot as plt
from collections.abc import Iterable
from io import BytesIO
from typing import Any, Dict
from typing import \
    Iterable as Iterable_t  # distinguish it from collections.abc.Iterable
from typing import Iterator, List, Optional, Tuple, Type, Union, cast
from ..cell import shapes
import cmath
import itertools
import math
import numpy as np
#!/usr/bin/env python
"""Module that implements Cell and Cluster related classes."""

try:
    # noinspection PyUnresolvedReferences
    # noinspection PyUnresolvedReferences

    _MATPLOTLIB_AVAILABLE = True
except ImportError:  # pragma: no cover
    _MATPLOTLIB_AVAILABLE = False




__all__ = [
    'Node', 'AccessPoint', 'CellBase', 'Cell', 'Cell3Sec', 'CellSquare',
    'CellWrap', 'Cluster', 'Grid'
]

IntOrIntIterable = Union[Iterable_t[int], int]
FloatOrFloatIterable = Union[Iterable_t[float], float]
StrOrStrIterable = Union[Iterable_t[str], str]


# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# xxxxxxxxxxxxxxx Node class xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Path: pyphysim/cell/shapes.py
#     _MATPLOTLIB_AVAILABLE = True
#     _MATPLOTLIB_AVAILABLE = False
#         A = self.pos.real
#         B = np.exp(1j * angle_rad).real
#         C = self.pos.imag
#         D = np.exp(1j * angle_rad).imag
#         A = self._lower_coord - self.pos
#         B = self._upper_coord - self.pos
#     POINT1 = h.get_border_point(90, 0.9)
#     POINT2 = h.get_border_point(10, 0.9)
#     POINT3 = h.get_border_point(30, 0.9)
#     POINT4 = h.get_border_point(107, 1)
# class Coordinate:
# class Shape(Coordinate):
# class Hexagon(Shape):
# class Rectangle(Shape):
# class Circle(Shape):
#     def __init__(self, pos: complex, **kwargs: Any) -> None:
#     def pos(self) -> complex:
#     def pos(self, value: complex) -> None:
#     def calc_dist(self, other: "Coordinate") -> float:
#     def move_by_relative_coordinate(self, rel_pos: complex) -> None:
#     def move_by_relative_polar_coordinate(self, radius: float,
#                                           angle: float) -> None:
#     def __repr__(self) -> str:  # pragma: no cover
#     def __init__(self,
#                  pos: complex,
#                  radius: float,
#                  rotation: float = 0,
#                  **kwargs: Any) -> None:
#     def __repr__(self) -> str:  # pragma: no cover
#     def radius(self) -> float:
#     def radius(self, value: float) -> None:
#     def rotation(self) -> float:
#     def rotation(self, value: float) -> None:
#     def _get_vertex_positions(self) -> np.ndarray:  # pragma: no cover
#     def vertices_no_trans_no_rotation(self) -> np.ndarray:  # pragma: no cover
#     def vertices(self) -> np.ndarray:
#     def is_point_inside_shape(self, point: complex) -> bool:
#     def get_border_point(
#             self,
#             angle: float,
#             ratio: Optional[float] = None) -> complex:  # pylint: disable=R0914
#     def plot(self, ax: Any = None) -> None:  # pragma: no cover
#     def _repr_some_format_(
#             self,
#             extension: str = 'png',
#             axis_option: str = 'equal') -> Any:  # pragma: nocover
#     def _repr_png_(self) -> Any:  # pragma: no cover
#     def _repr_svg_(self) -> Any:  # pragma: no cover
#     def calc_rotated_pos(cur_pos: ComplexOrArray,
#                          angle: float) -> ComplexOrArray:
#     def __init__(self,
#                  pos: complex,
#                  radius: float,
#                  rotation: float = 0,
#                  **kwargs: Any) -> None:
#     def height(self) -> float:
#     def _get_vertex_positions(self) -> np.ndarray:
#     def __init__(self,
#                  first: complex,
#                  second: complex,
#                  rotation: float = 0,
#                  **kwargs: Any) -> None:
#     def __repr__(self) -> str:  # pragma: no cover
#     def _get_vertex_positions(self) -> np.ndarray:
#     def _repr_some_format_(
#             self,
#             extension: str = 'png',
#             axis_option: str = 'tight') -> Any:  # pragma: no cover
#     def is_point_inside_shape(self, point: complex) -> bool:
#     def __init__(self, pos: complex, radius: float):
#     def _get_vertex_positions(self) -> np.ndarray:
#     def get_border_point(self,
#                          angle: float,
#                          ratio: Optional[float] = None) -> complex:
#     def is_point_inside_shape(self, point: complex) -> bool:
#     def plot(self, ax: Any = None) -> None:  # pragma: no cover
# def from_complex_array_to_real_matrix(a: np.ndarray) -> np.ndarray:


# Path: pyphysim/cell/cell.py
    from matplotlib import patches
    from matplotlib import pyplot as plt
from collections.abc import Iterable
from io import BytesIO
from typing import Any, Dict
from typing import \
    Iterable as Iterable_t  # distinguish it from collections.abc.Iterable
from typing import Iterator, List, Optional, Tuple, Type, Union, cast
from ..cell import shapes
import cmath
import itertools
import math
import numpy as np

#!/usr/bin/env python
"""Module that implements Cell and Cluster related classes."""

try:
    # noinspection PyUnresolvedReferences
    # noinspection PyUnresolvedReferences

    _MATPLOTLIB_AVAILABLE = True
except ImportError:  # pragma: no cover
    _MATPLOTLIB_AVAILABLE = False




__all__ = [
    'Node', 'AccessPoint', 'CellBase', 'Cell', 'Cell3Sec', 'CellSquare',
    'CellWrap', 'Cluster', 'Grid'
]

IntOrIntIterable = Union[Iterable_t[int], int]
FloatOrFloatIterable = Union[Iterable_t[float], float]
StrOrStrIterable = Union[Iterable_t[str], str]


# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# xxxxxxxxxxxxxxx Node class xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

class Node(shapes.Coordinate):