def argstr(arg):  # pragma: no cover
    """
    Return string representation of a function argument.

    :param object arg: Argument object. Differs between Python versions.
    :return: String name of argument.
    """
    if isinstance(arg, str):
        return arg
    if 'id' in arg._fields:
        return arg.id
    return arg.arg