@Nullable
  private List<? extends RatedResolveResult> resolveMetaClassMember(@NotNull String name,
                                                                    @Nullable PyExpression location,
                                                                    @NotNull AccessDirection direction,
                                                                    @NotNull PyResolveContext resolveContext) {
    final TypeEvalContext context = resolveContext.getTypeEvalContext();
    if (!myClass.isNewStyleClass(context)) {
      return null;
    }

    final PyClassLikeType typeType = getMetaClassType(context, true);
    if (typeType == null) {
      return null;
    }

    if (isDefinition()) {
      final List<? extends RatedResolveResult> typeMembers = typeType.resolveMember(name, location, direction, resolveContext);
      if (!ContainerUtil.isEmpty(typeMembers)) {
        return typeMembers;
      }

      final List<? extends RatedResolveResult> typeInstanceMembers =
        typeType.toInstance().resolveMember(name, location, direction, resolveContext);

      if (!ContainerUtil.isEmpty(typeInstanceMembers)) {
        return typeInstanceMembers;
      }
    }
    else if (typeType instanceof PyClassType) {
      final List<PyTargetExpression> typeInstanceAttributes = ((PyClassType)typeType).getPyClass().getInstanceAttributes();

      if (!ContainerUtil.isEmpty(typeInstanceAttributes)) {
        final List<RatedResolveResult> typeInstanceAttributesWithSpecifiedName = typeInstanceAttributes
          .stream()
          .filter(member -> name.equals(member.getName()))
          .map(member -> new RatedResolveResult(PyReferenceImpl.getRate(member, context), member))
          .collect(Collectors.toList());

        if (!typeInstanceAttributesWithSpecifiedName.isEmpty()) {
          return typeInstanceAttributesWithSpecifiedName;
        }
      }
    }

    return null;
  }
@Nullable
  private List<? extends RatedResolveResult> resolveMetaClassMember(@NotNull String name,
                                                                    @Nullable PyExpression location,
                                                                    @NotNull AccessDirection direction,
                                                                    @NotNull PyResolveContext resolveContext)