static boolean isIfNameMain(Location location) {
    PsiElement element = location.getPsiElement();
    while (true) {
      final PyIfStatement ifStatement = PsiTreeUtil.getParentOfType(element, PyIfStatement.class);
      if (ifStatement == null) {
        break;
      }
      element = ifStatement;
    }
    if (element instanceof PyIfStatement ifStatement) {
      return PyUtil.isIfNameEqualsMain(ifStatement);
    }
    return false;
  }
static boolean isIfNameMain(Location location)