@Nullable
  public static PyFunction getImplementation(@NotNull PyFunction function, @NotNull TypeEvalContext context) {
    final PsiFile file = function.getContainingFile();
    if (file instanceof PyiFile) return null;
    return ContainerUtil.getLastItem(collectImplementationsOrOverloads(function, true, context));
  }
@Nullable
  public static PyFunction getImplementation(@NotNull PyFunction function, @NotNull TypeEvalContext context)