def METHOD_NAME(all_bdfs, args):
    bdf_list = []
    for tgt in all_bdfs:
        if (not args.bus or (args.bus == tgt['bus'])) and \
           (not args.device or (args.device == tgt['device'])) and \
           (not args.function or (args.function == tgt['function'])) and \
           (not args.device_id or (args.device_id == tgt['device_id'])):
            bdf_list.append(tgt)
    return bdf_list