class_docstr: Manages issues related to null/missing values in the rows of features.
  
  Parameters
  ----------
  datalab :
      The Datalab instance that this issue manager searches for issues in.
class_docstr_tok: ["Manages","issues","related","to","null\/missing","values","in","the","rows","of","features",".","Parameters","--","--","--","--","--","datalab",":","The","Datalab","instance","that","this","issue","manager","searches","for","issues","in","."]
docstr: Identify and return the most common null value pattern across all rows
  and count the number of rows with this pattern.
  
  Parameters
  ------------
  null_tracker : np.ndarray
      A boolean array of the same shape as features, where True indicates null/missing entries.
  
  Returns
  --------
  Dict[str, Any]
      A dictionary containing the most common issue pattern and the count of rows with this pattern.
docstr_tok: ["Identify","and","return","the","most","common","null","value","pattern","across","all","rows","and","count","the","number","of","rows","with","this","pattern",".","Parameters","--","--","--","--","--","--","null_tracker",":","np.ndarray","A","boolean","array","of","the","same","shape","as","features",",","where","True","indicates","null\/missing","entries",".","Returns","--","--","--","--","Dict","[","str",",","Any","]","A","dictionary","containing","the","most","common","issue","pattern","and","the","count","of","rows","with","this","pattern","."]
code: def _most_common_issue(
      null_tracker: np.ndarray,
  ) -> dict[str, dict[str, str | int | list[int] | list[int | None]]]:
      """
      Identify and return the most common null value pattern across all rows
      and count the number of rows with this pattern.
  
      Parameters
      ------------
      null_tracker : np.ndarray
          A boolean array of the same shape as features, where True indicates null/missing entries.
  
      Returns
      --------
      Dict[str, Any]
          A dictionary containing the most common issue pattern and the count of rows with this pattern.
      """
      # Convert the boolean null_tracker matrix into a list of strings.
      most_frequent_pattern = "no_null"
      rows_affected: List[int] = []
      occurrence_of_most_frequent_pattern = 0
      if null_tracker.any():
          null_row_indices = np.where(null_tracker.any(axis=1))[0]
          null_patterns_as_strings = [
              "".join(map(str, null_tracker[i].astype(int).tolist()))
              for i in null_row_indices
          ]
  
          # Use Counter to efficiently count occurrences and find the most common pattern.
          pattern_counter = Counter(null_patterns_as_strings)
          (
              most_frequent_pattern,
              occurrence_of_most_frequent_pattern,
          ) = pattern_counter.most_common(1)[0]
          rows_affected = []
          for idx, row in enumerate(null_patterns_as_strings):
              if row == most_frequent_pattern:
                  rows_affected.append(int(null_row_indices[idx]))
      return {
          "most_common_issue": {
              "pattern": most_frequent_pattern,
              "rows_affected": rows_affected,
              "count": occurrence_of_most_frequent_pattern,
          }
      }
  
file_path: cleanlab/cleanlab/datalab/internal/issue_manager/null.py
imports: from __future__ import annotations
  from collections import Counter
  from typing import TYPE_CHECKING, Any, ClassVar, Dict, Optional, List
  import numpy
  import pandas
  from numpy import ndarray
  from cleanlab.datalab.internal.issue_manager import IssueManager
label_desc: Use image node_id 3 for calling the NullIssueManager obj's underlying member method code with example usage: obj._most_common_issue(null_tracker) and returns: dict