@NotNull
  public static Collection<? extends PyElement> getAllDependencies(
    @NotNull final PyClass classWhereMemberDeclared,
    @NotNull final PyElement member,
    @Nullable final PyClass destinationClass) {
    final PyMemberInfo<PyElement> memberInfo = findMember(classWhereMemberDeclared, member);


    final Collection<? extends PyElement> elementsToCheckDependency =
      memberInfo.getMembersManager().getElementsToStoreReferences(Collections.singleton(member));

    final MultiMap<PyClass, PyElement> dependencies = new MultiMap<>();

    final Collection<PyElement> result = new HashSet<>();
    for (final MembersManager<? extends PyElement> manager : MANAGERS) {
      for (final PyElement elementToCheckDependency : elementsToCheckDependency) {
        dependencies.putAllValues(manager.getDependencies(elementToCheckDependency));
      }
    }

    if (destinationClass != null) {
      final Iterator<PyClass> classesIterator = dependencies.keySet().iterator();
      while (classesIterator.hasNext()) {
        final PyClass memberClass = classesIterator.next();
        if (memberClass.equals(destinationClass) ||
            ArrayUtil.contains(memberClass, destinationClass.getSuperClasses(null))) { // IF still would be available
          classesIterator.remove();
        }
      }
    }

    for (final MembersManager<? extends PyElement> manager : MANAGERS) {
      result.addAll(manager.getDependencies(dependencies));
    }
    result.addAll(dependencies.values());
    return result;
  }
@NotNull
  public static Collection<? extends PyElement> getAllDependencies(
    @NotNull final PyClass classWhereMemberDeclared,
    @NotNull final PyElement member,
    @Nullable final PyClass destinationClass)