def get_xdist_worker_id(request):
    """Return a different string for each worker when running in parallel under pytest-
    xdist, else return an empty string.

    Returned strings are on the form, "gwN".

    """
    s = getattr(request.config, "slaveinput", {}).get("slaveid")
    return s if s is not None else ""