def _make_retry_timeout_kwargs(retry, timeout):
    """Helper for methods taking optional retry / timout args."""
    kwargs = {}

    if retry is not None:
        kwargs["retry"] = retry

    if timeout is not None:
        kwargs["timeout"] = timeout

    return kwargs