You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: needs_parens.rs
    path of file: ./repos/oxc/crates/oxc_prettier/src
    
    the code of the file until where you have to start completion: //! Direct port of needs-parens for adding or removing parentheses.
//!
//! See <https://github.com/prettier/prettier/blob/main/src/language-js/needs-parens.js>

#![allow(
    clippy::unused_self,
    clippy::match_same_arms,
    clippy::match_like_matches_macro,
    clippy::single_match
)]
use oxc_ast::{
    ast::{
        AssignmentTarget, AssignmentTargetPattern, ChainElement, ExportDefaultDeclarationKind,
        Expression, ForStatementLeft, MemberExpression, ModuleDeclaration, ObjectExpression,
        SimpleAssignmentTarget,
    },
    AstKind,
};
use oxc_span::{GetSpan, Span};
use oxc_syntax::{
    operator::{BinaryOperator, UnaryOperator, UpdateOperator},
    precedence::GetPrecedence,
};

use crate::{array
    
    fn check_object_expression(&self, obj_expr: &ObjectExpression<'a>) -> bool {
        let mut arrow_expr = None;
        for kind in self.stack.iter().rev() {
            if let AstKind::ArrowFunctionExpression(e) = kind {
                e.get_expression();
                arrow_expr = Some(e);
                break;
            }
        }
        if let Some(arrow_expr) = arrow_expr {
            if let Some(e) = arrow_expr.get_expression() {
                if !matches!(
                    e,
                    Expression::SequenceExpression(_) | Expression::AssignmentExpression(_)
                ) && Self::starts_with_no_lookahead_token(e, obj_expr.span)
                {
                    return true;
                }
            }
        }
        false
    }