code: def reinstantiate_endpoints(self, endpoint=None):
          
          endpoint = endpoint or self
          for k, v in endpoint.__class__.__dict__.items():
              if isinstance(v, Endpoint):
                  setattr(endpoint, k, v.__class__(self))
              elif inspect.isclass(v) and issubclass(v, Endpoint):
                  setattr(endpoint, k, v(self))
docs: This will re-instantiate the endpoints with the connection this time
          :param endpoint: Endpoint object to instantiate the sub endpoint in.
          :return:         None