class_docstr: Redact secrets from logs.
class_docstr_tok: ["Redact","secrets","from","logs","."]
docstr: Redact an any secrets found in ``item``, if it is a string.
  
  If ``name`` is given, and it's a "sensitive" name (see
  :func:`should_hide_value_for_key`) then all string values in the item
  is redacted.
docstr_tok: ["Redact","an","any","secrets","found","in","``","item","``",",","if","it","is","a","string",".","If","``","name","``","is","given",",","and","it","'s","a","``","sensitive","''","name","(","see",":","func",":","`","should_hide_value_for_key","`",")","then","all","string","values","in","the","item","is","redacted","."]
code: def redact(
      self,
      item: Redactable,
      name: str | None = None,
      max_depth: int | None = None,
  ) -> Redacted:
      """Redact an any secrets found in ``item``, if it is a string.
  
      If ``name`` is given, and it's a "sensitive" name (see
      :func:`should_hide_value_for_key`) then all string values in the item
      is redacted.
      """
      return self._redact(
          item,
          name,
          depth=0,
          max_depth=max_depth or self.MAX_RECURSION_DEPTH,
      )
  
imports: from __future__ import annotations
  import collections.abc
  import logging
  import sys
  from enum import Enum
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, Iterable, Iterator, List, Pattern, TextIO, Tuple, TypeVar, Union
  import re2
  from airflow import settings
  from airflow.compat.functools import cache
label_desc: Use image node_id 7 for calling the SecretsMasker obj's underlying member method code with example usage: obj.redact(item, name, max_depth) and returns: self