code: def selector(keys, dictionary, copy=False, output_type='dict',
               allow_miss=False):
      if not allow_miss:
          def check(key):
              return True
      else:
          def check(key):
              return key in dictionary
      if output_type == 'list':
          res = [dictionary[k] for k in keys if check(k)]
          return _copy.deepcopy(res) if copy else res
      elif output_type == 'values':
          return bypass(*[dictionary[k] for k in keys if check(k)], copy=copy)
      return bypass({k: dictionary[k] for k in keys if check(k)}, copy=copy)