code: def compute_nas_masked_metrics(
      frame_pairs: Sequence[FramePredictionPair],
      all_target_lens: List[int],
      all_target_length_preds: List[List[int]],
      select_length_beam: int,
      top_intent_accuracy: bool = True,
      frame_accuracy: bool = True,
      frame_accuracies_by_depth: bool = True,
      bracket_metrics: bool = True,
      tree_metrics: bool = True,
      overall_metrics: bool = False,
      all_predicted_frames: List[List[Node]] = None,
      calculated_loss: float = None,
      length_metrics: Dict = None,
      non_invalid_frame_pairs: Optional[
          Sequence[FramePredictionPair]
      ] = None,
      extracted_frame_pairs: Optional[
          Sequence[FramePredictionPair]
      ] = None,
      model_num_param: float = 1.0,
      ref_model_num_param: float = 1.0,
      ref_frame_accuracy: float = 1.0,
      param_importance: float = 1.0,
  ) -> NASMaskedSeq2SeqJointMetrics:
      masked_seq2seq_joint_metrics = compute_masked_metrics(
          frame_pairs,
          all_target_lens,
          all_target_length_preds,
          select_length_beam,
          overall_metrics=True,
          calculated_loss=calculated_loss,
          all_predicted_frames=all_predicted_frames,
          non_invalid_frame_pairs=non_invalid_frame_pairs,
          extracted_frame_pairs=extracted_frame_pairs,
      )
  
      # Compute the objective function, which is defined as
      # (current_model_accuracy / ref_model_accuracy) *
      # ((# of parameters in a reference model) / (# of parameters in the current model)) ** alpha
      #  where alpha is a hyper-parameter to determine the improtance of the second term
      norm_prod_model_param_frame_accuracy = (
          masked_seq2seq_joint_metrics.frame_accuracy
          * ref_model_num_param**param_importance
      ) / (ref_frame_accuracy * model_num_param**param_importance)
  
      return NASMaskedSeq2SeqJointMetrics(
          top_intent_accuracy=masked_seq2seq_joint_metrics.top_intent_accuracy,
          frame_accuracy=masked_seq2seq_joint_metrics.frame_accuracy,
          frame_accuracy_top_k=masked_seq2seq_joint_metrics.frame_accuracy_top_k,
          frame_accuracies_by_depth=masked_seq2seq_joint_metrics.frame_accuracies_by_depth,
          bracket_metrics=masked_seq2seq_joint_metrics.bracket_metrics,
          tree_metrics=masked_seq2seq_joint_metrics.tree_metrics,
          loss=masked_seq2seq_joint_metrics.loss,
          length_metrics=masked_seq2seq_joint_metrics.length_metrics,
          length_reports=masked_seq2seq_joint_metrics.length_reports,
          non_invalid_fa=masked_seq2seq_joint_metrics.non_invalid_fa,
          extracted_fa=masked_seq2seq_joint_metrics.extracted_fa,
          model_num_param=model_num_param,
          norm_prod_model_param_frame_accuracy=norm_prod_model_param_frame_accuracy,
      )
  
file_path: pytext/pytext/metrics/mask_metrics.py
imports: from typing import Dict, List, NamedTuple, Optional, Sequence
  from pytext.metrics import ClassificationMetrics, compute_classification_metrics, LabelPrediction
  from pytext.metrics.intent_slot_metrics import compute_all_metrics, compute_frame_accuracy, FrameAccuraciesByDepth, FramePredictionPair, IntentSlotMetrics, Node
  from sklearn.metrics import accuracy_score
label_desc: Use image node_id 3 for calling a global function with example usage: compute_nas_masked_metrics(frame_pairs, all_target_lens, all_target_length_preds, select_length_beam, top_intent_accuracy, frame_accuracy, frame_accuracies_by_depth, bracket_metrics, tree_metrics, overall_metrics, all_predicted_frames, calculated_loss, length_metrics, non_invalid_frame_pairs, extracted_frame_pairs, model_num_param, ref_model_num_param, ref_frame_accuracy, param_importance) and returns: NASMaskedSeq2SeqJointMetrics