class_docstr: Search for various types of null values, including string representations of null.
  
  Parameters
  ----------
  null_string_list : Iterable[str] , default: None
      List of strings to be considered alternative null representations
  check_nan : bool , default: True
      Whether to add to null list to check also NaN values
  columns : Union[Hashable, List[Hashable]] , default: None
      Columns to check, if none are given checks all columns except ignored ones.
  ignore_columns : Union[Hashable, List[Hashable]] , default: None
      Columns to ignore, if none given checks based on columns variable
  n_top_columns : int , optional
      amount of columns to show ordered by feature importance (date, index, label are first)
  aggregation_method: t.Optional[str], default: 'max'
      {feature_aggregation_method_argument:2*indent}
  n_samples : int , default: 10_000_000
      number of samples to use for this check.
  random_state : int, default: 42
      random seed for all check internals.
class_docstr_tok: ["Search","for","various","types","of","null","values",",","including","string","representations","of","null",".","Parameters","--","--","--","--","--","null_string_list",":","Iterable","[","str","]",",","default",":","None","List","of","strings","to","be","considered","alternative","null","representations","check_nan",":","bool",",","default",":","True","Whether","to","add","to","null","list","to","check","also","NaN","values","columns",":","Union","[","Hashable",",","List","[","Hashable","]","]",",","default",":","None","Columns","to","check",",","if","none","are","given","checks","all","columns","except","ignored","ones",".","ignore_columns",":","Union","[","Hashable",",","List","[","Hashable","]","]",",","default",":","None","Columns","to","ignore",",","if","none","given","checks","based","on","columns","variable","n_top_columns",":","int",",","optional","amount","of","columns","to","show","ordered","by","feature","importance","(","date",",","index",",","label","are","first",")","aggregation_method",":","t.Optional","[","str","]",",","default",":","'max'","{","feature_aggregation_method_argument:2","*","indent","}","n_samples",":","int",",","default",":","10_000_000","number","of","samples","to","use","for","this","check",".","random_state",":","int",",","default",":","42","random","seed","for","all","check","internals","."]
docstr: Add condition - require column's number of different null values to be less or equal to threshold.
  
  Parameters
  ----------
  max_allowed_null_types : int , default: 1
      Number of different null value types which is the maximum allowed.
docstr_tok: ["Add","condition","-","require","column","'s","number","of","different","null","values","to","be","less","or","equal","to","threshold",".","Parameters","--","--","--","--","--","max_allowed_null_types",":","int",",","default",":","1","Number","of","different","null","value","types","which","is","the","maximum","allowed","."]
code: def add_condition_different_nulls_less_equal_to(
      self, max_allowed_null_types: int = 1
  ):
      """Add condition - require column's number of different null values to be less or equal to threshold.
  
      Parameters
      ----------
      max_allowed_null_types : int , default: 1
          Number of different null value types which is the maximum allowed.
      """
  
      def condition(result: Dict) -> ConditionResult:
          not_passing_columns = [
              k
              for k, v in result["columns"].items()
              if len(v) > max_allowed_null_types
          ]
          if not_passing_columns:
              details = (
                  f'Found {len(not_passing_columns)} out of {len(result["columns"])} columns with amount of'
                  f" null types above threshold: {not_passing_columns}"
              )
              return ConditionResult(ConditionCategory.FAIL, details)
          else:
              return ConditionResult(
                  ConditionCategory.PASS,
                  get_condition_passed_message(result["columns"]),
              )
  
      return self.add_condition(
          f"Number of different null types is less or equal to {max_allowed_null_types}",
          condition,
      )
  
imports: import math
  from typing import Dict, Iterable, List, Optional, Union
  import numpy
  import pandas
  from pandas.api.types import is_categorical_dtype
  from deepchecks.core import CheckResult, ConditionCategory, ConditionResult
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.core.reduce_classes import ReduceFeatureMixin
  from deepchecks.tabular import Context, SingleDatasetCheck
  from deepchecks.tabular._shared_docs import docstrings
  from deepchecks.tabular.utils.feature_importance import N_TOP_MESSAGE
  from deepchecks.tabular.utils.messages import get_condition_passed_message
  from deepchecks.utils.dataframes import select_from_dataframe
  from deepchecks.utils.strings import format_percent, string_baseform
  from deepchecks.utils.typing import Hashable
label_desc: Use image node_id 5 for calling the MixedNulls obj's underlying member method code with example usage: obj.add_condition_different_nulls_less_equal_to(max_allowed_null_types) and returns: self, ConditionResult, ConditionResult