def get_testsuite_name(suite):
    """
    Returns the name to be used for the given testsuite. This is made of
    the class name and the result of "suite_name()" method if this exists

    :param suite: Suite object whose name is needed
    :type suite: ``testsuite``

    :return: Name of given suite
    :rtype: ``str``
    """
    name = suite.__class__.__name__
    if hasattr(suite, 'suite_name') and\
          callable(getattr(suite, 'suite_name')) and\
                suite.suite_name() is not None:
        return '{} - {}'.format(name, suite.suite_name())
    return name