@Nullable
  public static Boolean isCallable(@Nullable PyType type) {
    if (type == null) {
      return null;
    }
    if (type instanceof PyUnionType) {
      return isUnionCallable((PyUnionType)type);
    }
    if (type instanceof PyCallableType) {
      return ((PyCallableType)type).isCallable();
    }
    if (type instanceof PyStructuralType && ((PyStructuralType)type).isInferredFromUsages()) {
      return true;
    }
    if (type instanceof PyTypeVarType typeVarType) {
      if (typeVarType.isDefinition()) {
        return true;
      }

      return isCallable(typeVarType.getBound());
    }
    return false;
  }
@Nullable
  public static Boolean isCallable(@Nullable PyType type)