def expand_option(option):
    """expand option that is a ',' separated list of assignments.
    """
    kwargs = {}
    option = option.strip()
    if len(option) == 0:
        return kwargs
    parts = option.split(',')
    for part in parts:
        if not part.strip():
            continue
        if '=' not in part:
            raise ValueError("malformed tracker options '{}' in '{}'".
                format(part, option))
        key, val = part.split('=', 1)
        try:
            kwargs[key.strip()] = eval(val.strip())
        except NameError:
            kwargs[key.strip()] = val
    return kwargs
