private boolean shouldRegisterProblem(PyFunction function) {
    if (m_onlyWhenTypesAreKnown) {
      PySignatureCacheManager instance = PySignatureCacheManager.getInstance(function.getProject());
      if (instance != null) {
        PySignature signature = instance.findSignature(function);
        return signature != null && canAnnotate(signature);
      } else {
        return false;
      }
    }
    else {
      return true;
    }
  }
private boolean shouldRegisterProblem(PyFunction function)