code: def _filter(self, dict, keep):
          
          if not keep:
              return dict
  
          result = {}
          for key, value in dict.iteritems():
              if key in keep:
                  result[key] = value
          return result
docs: Remove any keys not in 'keep'