public static boolean isDict(@Nullable PyType type) {
    return type instanceof PyCollectionType && "dict".equals(type.getName()) ||
           type instanceof PyTypedDictType && ((PyTypedDictType)type).isInferred();
  }
public static boolean isDict(@Nullable PyType type)