<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ads_use_dev_spaces(cluster_name, resource_group_name, update=False, space_name=None, do_not_prompt=False):
 """ Use Azure Dev Spaces with a managed Kubernetes cluster. :param cluster_name: Name of the managed cluster. :type cluster_name: String :param resource_group_name: Name of resource group. You can configure the default group. \ Using 'az configure --defaults group=<name>'. :type resource_group_name: String :param update: Update to the latest Azure Dev Spaces client components. :type update: bool :param space_name: Name of the new or existing dev space to select. Defaults to an interactive selection experience. :type space_name: String :param do_not_prompt: Do not prompt for confirmation. Requires --space. :type do_not_prompt: bool """


    azds_cli = _install_dev_spaces_cli(update)

    use_command_arguments = [azds_cli, 'use', '--name', cluster_name,
                             '--resource-group', resource_group_name]

    if space_name is not None:
        use_command_arguments.append('--space')
        use_command_arguments.append(space_name)

    if do_not_prompt:
        use_command_arguments.append('-y')
    subprocess.call(
        use_command_arguments, universal_newlines=True)