def parse_kwargs(val):
    """
        Given a string with form:
            'x=1 y=2'
        it parses it to return a dictionary of the form:
            {x:1, y:2}

        Arguments:
            val: str
        
        Returns:
            parsed kwargs: dict
    """
    kwargs = {}
    if val:
        for pair in val[0].split(" "):
            k, v = pair.split("=")
            kwargs[k] = float(v)
    return kwargs