def _extract_param(arg, name):
    """Extract a parameter in the style of "key=value".

    Return `''` if the `arg == name`,
           :obj:`None` if the key does not match name,
           value otherwise (might be `''`).
    """
    if arg.startswith(name):
        param = arg[len(name):]
        if param == '':
            return ''
        if param[0] != '=':
            return None
        return param[1:]
    return None