def str2bool(v: str) ->bool:
    """Parse str to bool.

    Args:
      v(str): The string to parse.

    Returns:
      bool: The parsed value.

    """
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise ValueError('Boolean value expected.')
