  def Enumerate(
      self,
      namespace: Optional[str] = None,
      filter_empty: bool = True,
      silent: bool = False,
      print_func_arg: Optional[Callable[[str, int], None]] = None) -> str:
    """Enumerates the object and its children to the user.

    Args:
      namespace (str): Optional. The namespace in which to enumerate. If
          unspecified (None), enumerates in all namespaces.
      filter_empty (bool): Optional. Whether or not to filter out information
          lines for which the value is empty. Defaults to True.
      silent (bool): Optional. If True, the output from the enumeration is not
          logged to stdout.
      print_func_arg (Callable[[str, int], None]): Optional. The function to use
          for displaying and registering the enumeration text. Only to be used
          internally.

    Returns:
      str: The intercepted enumeration text.
    """

    rows = []

    def PrintFunc(text: str, level: int) -> None:
      """Displays and registers the given text.

      Args:
        text (str): The text to be displayed and registered.
        level (int): The log level of the text.
      """
      rows.append(text)
      if not silent:
        logger.log(level, text)

    print_func: Callable[[str, int], None]
    if print_func_arg is None:
      print_func = PrintFunc
    else:
      print_func = print_func_arg

    def ChildPrintFunc(text: str, level: int) -> None:
      """Wraps the current _print_func with an indent.

      Args:
        text (str): The text to be displayed and registered.
        level (int): The log level of the text.
      """
      print_func(self._INDENT_STRING + text, level)

    print_func(self.keyword, logging.INFO)
    self.__PrintTable(print_func, filter_empty)
    for child in self._Children(namespace=namespace):
      child.Enumerate(
          namespace=namespace,
          filter_empty=filter_empty,
          print_func_arg=ChildPrintFunc)

    return '\n'.join(rows)
Enumerates the object and its children to the user.

Args:
namespace (str): Optional. The namespace in which to enumerate. If
unspecified (None), enumerates in all namespaces.
filter_empty (bool): Optional. Whether or not to filter out information
lines for which the value is empty. Defaults to True.
silent (bool): Optional. If True, the output from the enumeration is not
logged to stdout.
print_func_arg (Callable[[str, int], None]): Optional. The function to use
for displaying and registering the enumeration text. Only to be used
internally.

Returns:
str: The intercepted enumeration text.
libcloudforensics/providers/kubernetes/enumerations/base.py