@Override
  public @Nullable PyClass getContainingClass() {
    final PyFunctionStub stub = getStub();
    if (stub != null) {
      final StubElement parentStub = stub.getParentStub();
      if (parentStub instanceof PyClassStub) {
        return ((PyClassStub)parentStub).getPsi();
      }

      return null;
    }

    return PyFunction.super.getContainingClass();
  }
@Override
  public @Nullable PyClass getContainingClass()