def create_pytest_param_str_id(f):
    # type: (...) -> str
    """
    Returns an id that can be used as a pytest id, from an object.

    :param f:
    :return:
    """
    if callable(f) and hasattr(f, '__name__'):
        return f.__name__
    else:
        return str(f)