code: def _select_options(self, options, keys, invert=False):
          
          options = self._merge_options(options)
          result = {}
          for key in options:
              if (invert and key not in keys) or (not invert and key in keys):
                  result[key] = options[key]
          return result
docs: Select the provided keys out of an options object.
  
  
          Selects the provided keys (or everything except the provided keys) out
          of an options object.