<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fieldspec_subset_by_name( fieldspeclist: FIELDSPECLIST_TYPE, fieldnames: Container[str]) -> FIELDSPECLIST_TYPE: """Returns a subset of the fieldspecs matching the fieldnames list."""

        result = []
        for x in fieldspeclist:
            if x["name"] in fieldnames:
                result.append(x)
        return result