import shlex


def _parse_tags(tags: str):
    """Takes a string of whitespace seperated tags
    and assigns them to a dict. Expects each tag to
    be of the format 'tag_name:tag_value'

    Args:
        tags (str): The tags to parse

    Returns:
        dict: The parsed tags
    """
    return dict(item.split(":") for item in shlex.split(tags))