code: def filter_by_size(feat_dir: Path, prefixes: List[str], feat_type: str,
                     max_samples: int) -> List[str]:
      prefix_lens = get_prefix_lens(Path(feat_dir), prefixes, feat_type)
      prefixes = [prefix for prefix, length in prefix_lens
                  if length <= max_samples]
      return prefixes