      """
      Remove leading indent from a block of text.
      Used when generating descriptions from docstrings.
      """
      try:
          content = content.decode('utf-8')
      except (AttributeError, UnicodeEncodeError):
          pass  # the string should keep the default 'ascii' encoding in
                # Python 2.x or stay a unicode string in Python 3.x
      whitespace_counts = [len(line) - len(line.lstrip(' '))
                           for line in content.splitlines()[1:] if line.lstrip()]
  
      # unindent the content if needed
      if whitespace_counts:
 
</s> remove     description = _remove_leading_indent(description)
 </s> add     description = _remove_leading_indent(smart_text(description)) </s> remove from rest_framework.compat import apply_markdown
 </s> add from rest_framework.compat import apply_markdown, smart_text
      """
      Remove leading indent from a block of text.
      Used when generating descriptions from docstrings.
      """





      whitespace_counts = [len(line) - len(line.lstrip(' '))
                           for line in content.splitlines()[1:] if line.lstrip()]
  
      # unindent the content if needed
      if whitespace_counts:
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Refactored get_view_description, moved appropriate tests to test_description.py 
rest_framework/utils/formatting.py