docs: def add_pending(self, family: str, email: str=None) -> models.Analysis:
          """Add pending entry for an analysis."""
          started_at = dt.datetime.now()
          new_log = self.Analysis(family=family, status='pending', started_at=started_at)
          new_log.user = self.user(email) if email else None
          self.add_commit(new_log)
          return new_log