import re


def get_filename_parts(filename, default_suffix=''):
    """ Parses a string representing a filename and returns as a 2-element
    string tuple with the filename stem and its suffix (the shortest string
    after a dot from the end of the string). If there's no suffix found a
    default is used instead.

    Args:
        filename(string): The input file name expected to contain a GraphViz DOT
        digraph.
        default_suffix(string, optional): The suffix to use if one cannot be
        found from the filename. Defaults to an empty string.

    Returns (string, string): A 2 element tuple of the filename stem and its
    suffix.
    """
    m = re.match(r'(.*)(\..*$)', filename)
    if not m:
        return (filename, default_suffix)

    return m.group(1, 2)