def __long_substr(strings):
    """

    Returns longest common substring of list of strings. taken from:
    # https://stackoverflow.com/questions/2892931/longest-common-substring-
    from-more-than-two-strings-python

    Parameters
    ----------
    strings: list
        A list of strings.

    Returns
    -------
    substr: str
        The longest common substring of all list elements. For a list with only
        one element, the list element is returned; for an empty list, and empty
        string is returned.

    """
    substr = ''
    if len(strings) > 1 and len(strings[0]) > 0:
        for i in range(len(strings[0])):
            for j in range(len(strings[0]) - i + 1):
                if j > len(substr) and all(strings[0][i:i + j] in x for x in
                                           strings):
                    substr = strings[0][i:i + j]
    return substr