def METHOD_NAME(
    dag: DAG, user_supplied_str: str
) -> List[uuid.UUID]:
    """Looks for any user-defined parameters in the string, looks up those parameters and returns
    them in the order they appear in the string.
    """
    param_artifact_ids: List[uuid.UUID] = []
    matches = re.findall(USER_TAG_PATTERN, user_supplied_str)
    for match in matches:
        param_name = match.strip(" {}")
        param_ops = dag.get_param_ops_by_name(param_name)
        found_artifact: Optional[ArtifactMetadata] = None
        if len(param_ops) > 0:
            # Use the first explicitly-named parameter artifact we find.
            param_artifacts = dag.must_get_artifacts(
                [param_op.outputs[0] for param_op in param_ops]
            )
            for param_artifact in param_artifacts:
                if param_artifact.explicitly_named:
                    found_artifact = param_artifact
                    break
        if not found_artifact:
            raise InvalidUserArgumentException(
                "The parameter `%s` is not defined but is used in `%s`."
                % (param_name, user_supplied_str)
            )
        else:
            _validate_artifact_metadata_is_string(found_artifact)
            param_artifact_ids.append(found_artifact.id)
    return param_artifact_ids