title: Python how to force method to take only instacne of the class as a parameter
body: <p>How can I specify that only instance of this class can be given as a parameter to this class methods? When I tried to use annotations it says class name is not defined.
  For example I have class Atom and I want methods get_distance_to and get_energy_with to only take instances of class Atom itself as the second parameter:</p>
  <pre><code>from dataclasses import dataclass, field
  from random import uniform
  from math import dist
  
  
  @ dataclass
  class Atom():
  
      A: int = 0.5  # ???? Как конкретно работают эти коэфиценты 
      B: int = 0.5
      position: list = field(default_factory=list)
      
  
      def __post_init__(self) -&gt; None:
          if not self.position:
              self.position = [uniform(0, 10),
                        uniform(0, 10),
                        uniform(0, 10)]  # x y z
  
      def get_distance_to(self, atom):
          return dist(self.position,
                      atom.position)
  
      def get_energy_with(self, atom):
          A_general = self.A + atom.A
          B_general = self.B + atom.B
          r = self.get_distance_to(atom)
  
          U = (A_general / (r**12)) - (B_general / (r**6))
          
          return U
  </code></pre>