code: def fieldspec_subset_by_name(
              fieldspeclist: FIELDSPECLIST_TYPE,
              fieldnames: Container[str]) -> FIELDSPECLIST_TYPE:
          
          result = []
          for x in fieldspeclist:
              if x["name"] in fieldnames:
                  result.append(x)
          return result
docs: Returns a subset of the fieldspecs matching the fieldnames list.