def get_compatibility_list_from_parser(parser):
    """
    Extract the docstring information (if any) about compatible versions

    :param parser: a parser function
    :return: list of versions
    """
    docstring = parser.__doc__
    if docstring is None:
        return None

    lines = docstring.split('\n')
    for line in lines:
        if 'compatibility' in line.lower():
            try:
                return [version.strip() for version in line.split(':')[1].split(',')]
            except IndexError:
                continue

    return None