def METHOD_NAME(params: dict, param_name_list: List[str]) -> dict:
    """Check if the argument is in the list and convert it to a str object
    Parameters
    ----------
    params : dict
        The parameters to be converted
    param_name_list : List[str]
        The list of arguments to be converted
    Returns
    -------
    dict
        The converted parameters
    """
    for param_name in param_name_list:
        if param_name in params:
            param_value = params[param_name]
            if isinstance(param_value, date):
                params[param_name] = param_value.strftime("%Y-%m-%d")
            elif isinstance(param_value, str):
                try:
                    param_value = datetime.strptime(param_value, "%Y-%m-%d")
                except ValueError:
                    console.print(
                        f"[red]'{param_name}' format is not a valid date, must be YYYY-MM-DD.\n[/red]"
                    )
                    params.pop(param_name)
            else:
                console.print(
                    f"[red]'{param_name}' format is not a valid date, must be YYYY-MM-DD.\n[/red]"
                )
                params.pop(param_name)
    return params