def _parse_options(options: List[str]) -> Dict[str, str]:
    """ Parse repeatable CLI options

    >>> opts = _parse_options(['cluster.name=foo', 'CRATE_JAVA_OPTS="-Dxy=foo"'])
    >>> print(json.dumps(opts, sort_keys=True))
    {"CRATE_JAVA_OPTS": "\\"-Dxy=foo\\"", "cluster.name": "foo"}
    """
    try:
        return dict(i.split('=', maxsplit=1) for i in options)
    except ValueError:
        raise ArgumentError(
            f'Option must be in format <key>=<value>, got: {options}')
def _parse_options ( options : List [ str ] ) -> Dict [ str , str ] : try : return dict ( i . split ( '=' , maxsplit = 1 ) for i in options ) except ValueError : raise ArgumentError ( f'Option must be in format <key>=<value>, got: {options}' )
Parse repeatable CLI options

    >>> opts = _parse_options(['cluster.name=foo', 'CRATE_JAVA_OPTS="-Dxy=foo"'])
    >>> print(json.dumps(opts, sort_keys=True))
    {"CRATE_JAVA_OPTS": "\\"-Dxy=foo\\"", "cluster.name": "foo"}