docstr: :param first_names: users first names (optional - if last_names/zip_codes are provided)
  :param last_names: users last names (optional - if first_names/zip_codes are provided)
  :param zip_codes: users zip codes (optional - if first_names/last_names are provided)
  :param y_true: true labels - 0/1 (optional - only some BiasMetric requires it)
  :param y_pred: predicted labels - 0/1
  :param detect_gender_bias: detect gender bias (optional - default True)
  :param detect_race_bias: detect race bias (optional - default True)
  :param kwargs: additional params
  :return: BiasReport
docstr_tok: [":","param","first_names",":","users","first","names","(","optional","-","if","last_names\/zip_codes","are","provided",")",":","param","last_names",":","users","last","names","(","optional","-","if","first_names\/zip_codes","are","provided",")",":","param","zip_codes",":","users","zip","codes","(","optional","-","if","first_names\/last_names","are","provided",")",":","param","y_true",":","true","labels","-","0\/1","(","optional","-","only","some","BiasMetric","requires","it",")",":","param","y_pred",":","predicted","labels","-","0\/1",":","param","detect_gender_bias",":","detect","gender","bias","(","optional","-","default","True",")",":","param","detect_race_bias",":","detect","race","bias","(","optional","-","default","True",")",":","param","kwargs",":","additional","params",":","return",":","BiasReport"]
code: def get_bias_report(
      self,
      first_names: Sequence[str] = None,
      last_names: Sequence[str] = None,
      zip_codes: Sequence[str] = None,
      y_true: Sequence[float] = None,
      y_pred: Sequence[float] = None,
      detect_gender_bias: bool = True,
      detect_race_bias: bool = True,
      **kwargs: dict,
  ) -> BiasReport:
      """
      :param first_names: users first names (optional - if last_names/zip_codes are provided)
      :param last_names: users last names (optional - if first_names/zip_codes are provided)
      :param zip_codes: users zip codes (optional - if first_names/last_names are provided)
      :param y_true: true labels - 0/1 (optional - only some BiasMetric requires it)
      :param y_pred: predicted labels - 0/1
      :param detect_gender_bias: detect gender bias (optional - default True)
      :param detect_race_bias: detect race bias (optional - default True)
      :param kwargs: additional params
      :return: BiasReport
      """
      if not detect_gender_bias and not detect_race_bias:
          raise ValueError(
              "Both detect_gender_bias and detect_race_bias are False"
          )
      y_scores = kwargs.get("y_scores", None)
      input_p_groups = kwargs.get("p_groups", None)
      privileged_race = kwargs.get("privileged_race", None)
      if privileged_race is not None:
          privileged_race = privileged_race.lower()
      if input_p_groups is not None:
          if type(input_p_groups) != pd.DataFrame:
              raise ValueError("""p_groups must be a pd.DataFrame""")
          if detect_gender_bias and not {"male", "female"}.issubset(
              set(input_p_groups.columns)
          ):
              raise ValueError(
                  """detect_gender_bias=True, p_groups columns must contain: ['male', 'female']"""
              )
          if detect_race_bias and not set(races).issubset(
              set(input_p_groups.columns)
          ):
              raise ValueError(
                  """detect_race_bias=True, p_groups columns must contain: ['white', 'black', 'api', 'hispanic', 'native']"""
              )
          input_p_groups = input_p_groups.reset_index(drop=True)
      else:
          input_p_groups = None
      classification_threshold = kwargs.get(
          "classification_threshold", 0.5
      )
      y_true = self.to_series(y_true, "y_true", float)
      y_pred = self.to_series(y_pred, "y_pred", float)
      y_scores = self.to_series(y_scores, "y_scores", float)
      if y_pred is None and y_scores is None:
          raise ValueError("y_pred/y_scores were not provided")
      if len(set(np.unique(y_pred)) - {0, 1}) > 0:
          raise ValueError(
              "only binary classification is supported, y_pred should contain only 0/1"
          )
      if y_pred is None and y_scores is not None:
          y_pred = [
              y_score >= classification_threshold
              for y_score in y_scores
          ]
      if not self.__is_same_length(
          [
              first_names,
              last_names,
              zip_codes,
              y_true,
              y_pred,
              y_scores,
              input_p_groups,
          ]
      ):
          raise ValueError("Input data has different lengths")
      if y_true is None:
          bias_metrics = [BiasMetric.statistical_parity]
      else:
          bias_metrics = [
              BiasMetric.statistical_parity,
              BiasMetric.equal_opportunity,
              BiasMetric.predictive_equality,
          ]
      p_groups = (
          input_p_groups
          if input_p_groups is not None
          else self.get_p_groups(
              first_names,
              last_names,
              zip_codes,
              detect_gender_bias,
              detect_race_bias,
          )
      )
      groups_names = p_groups.columns
      bias_metrics_results = pd.DataFrame(
          index=[bias_metric.name for bias_metric in bias_metrics],
          columns=groups_names,
      )
      for bias_metric in bias_metrics:
          bias_metrics_impl = self.__get_bias_metrics_impl(bias_metric)
          metric_input = BiasMetricInput(
              p_groups, y_true, y_pred, y_scores, privileged_race
          )
          bias_metric_output = bias_metrics_impl.execute(metric_input)
          results = bias_metric_output.results
          bias_metrics_results.loc[bias_metric.name] = results
      estimated_groups_sizes = pd.Series(index=groups_names)
      for group_name in p_groups.columns:
          estimated_groups_sizes[group_name] = p_groups[
              group_name
          ].sum()
      if detect_gender_bias:
          estimated_groups_sizes["gender_unknown"] = (
              p_groups[["male", "female"]].sum(axis=1) == 0
          ).sum()
      if detect_race_bias:
          estimated_groups_sizes["race_unknown"] = (
              p_groups[races].sum(axis=1) == 0
          ).sum()
      estimated_groups_sizes = estimated_groups_sizes.astype(int)
      return BiasReport(
          bias_metrics_results=bias_metrics_results,
          estimated_groups_sizes=estimated_groups_sizes,
          y_true=y_true,
          y_pred=y_pred,
          y_scores=y_scores,
          privileged_race=privileged_race,
          p_groups=p_groups,
          detect_gender_bias=detect_gender_bias,
          detect_race_bias=detect_race_bias,
      )
  
imports: from bias_detector.BiasMetric import BiasMetric
  from bias_detector.BiasReport import BiasReport
  from bias_detector.models.FirstNameModel import FirstNameModel
  from bias_detector.models.FirstNameZipcodeModel import FirstNameZipcodeModel
  from bias_detector.models.FullNameModel import FullNameModel
  from bias_detector.models.FullNameZipcodeModel import FullNameZipcodeModel
  from bias_detector.bias_metrics.BiasMetricImpl import BiasMetricImpl
  from bias_detector.bias_metrics.BiasMetricInput import BiasMetricInput
  from bias_detector.bias_metrics.FprDiff import FprDiff
  from bias_detector.bias_metrics.PositivePredProbDiff import PositivePredProbDiff
  from bias_detector.bias_metrics.TprDiff import TprDiff
  from bias_detector.common import *
  import surgeo
label_desc: Use image node_id 4 for calling the BiasDetector obj's underlying member method code with example usage: obj.get_bias_report(first_names, last_names, zip_codes, y_true, y_pred, detect_gender_bias, detect_race_bias) and returns: BiasReport