code: def distance(vec1, vec2):
          
          if isinstance(vec1, Vector2) \
                  and isinstance(vec2, Vector2):
              dist_vec = vec2 - vec1
              return dist_vec.length()
          else:
              raise TypeError("vec1 and vec2 must be Vector2's")
docs: Calculate the distance between two Vectors