code: def split_leading_trailing_indent(line, max_indents=None):
      
      leading_indent, line = split_leading_indent(line, max_indents)
      line, trailing_indent = split_trailing_indent(line, max_indents)
      return leading_indent, line, trailing_indent
docs: Split leading and trailing indent.