def trim_txt(txt, limit=10000):
    """Trim a str if it is over n characters.

    Args:
        txt (:obj:`str`):
            String to trim.
        limit (:obj:`int`, optional):
            Number of characters to trim txt to.

            Defaults to: 10000.

    Returns:
        :obj:`str`

    """
    trim_line = "\n... trimmed over {limit} characters".format(limit=limit)
    txt = txt[:limit] + trim_line if len(txt) > limit else txt
    return txt