docs: def create_design_doc(self):
          """Create a design document from a Python map function"""
          source = [x for x in inspect.getsourcelines(self.func)[0]
                    if not x.startswith('@')]
  
          doc = {
              '_id': '_design/{}'.format(self.name),
              'language': 'python',
              'views': {
                  self.name: {
                      'map': ''.join(source)
                  }
              }
          }
  
          return doc