def _capture_callback(x):
    """Validate the passed options for capturing output."""
    if x in [None, "None", "none"]:
        x = None
    elif x in ["fd", "no", "sys", "tee-sys"]:
        pass
    else:
        raise ValueError("'capture' can only be one of ['fd', 'no', 'sys', 'tee-sys'].")

    return x