def _convert_args(args: Namespace) -> Tuple[(Namespace, str)]:

    def convert_value(value: Any) -> Any:
        if isinstance(value, List):
            return [convert_value(x) for x in value]
        return (value.path if isinstance(value, BundleWithPath) else value)
    bundle_id = _extract_bundle_id(args)
    args = Namespace(**{key: convert_value(value) for (key, value) in vars(args).items() if (key != 'bundle_id')})
    return (args, bundle_id)
def _convert_args(args: Namespace) -> Tuple[(Namespace, str)]:

    def convert_value(value: Any) -> Any:
        if isinstance(value, List):
            return [convert_value(x) for x in value]
        return (value.path if isinstance(value, BundleWithPath) else value)
    bundle_id = _extract_bundle_id(args)
    args = Namespace(**{key: convert_value(value) for (key, value) in vars(args).items() if (key != 'bundle_id')})
    return (args, bundle_id)