code: def extract_kwargs(args, exp_keys, exp_elems):
      
      arg_dict = {}    # For arguments that have values
      arg_set = set()  # For arguments that are True or False (present in set if True)
      for key, val in args.items():
          if exp_keys is not None and key in exp_keys and val:
              arg_dict[key] = val
          elif exp_elems is not None and key in exp_elems and val:
              arg_set.add(key)
      return {'dict':arg_dict, 'set':arg_set}
docs: Return user-specified keyword args in a dictionary and a set (for True/False items).