def _pad ( self ) : if self . _indent : self . whitespace ( self . _indent * len ( self . _open_elements ) )
how to indent self python
Pads the output with an amount of indentation appropriate for the number of open element .
def _pad(self):
    """Pads the output with an amount of indentation appropriate for the number of open element.

    This method does nothing if the indent value passed to the constructor is falsy.
    """
    if self._indent:
      self.whitespace(self._indent * len(self._open_elements))