code: def _add_users(self, db, mongo_version):
          
          if self.x509_extra_user:
              # Build dict of kwargs to pass to add_user.
              auth_dict = {
                  'name': DEFAULT_SUBJECT,
                  'roles': self._user_roles(db.client)
              }
              db.add_user(**auth_dict)
              # Fix kwargs to MongoClient.
              self.kwargs['ssl_certfile'] = DEFAULT_CLIENT_CERT
  
          # Add secondary user given from request.
  
          secondary_login = {
              'name': self.login,
              'roles': self._user_roles(db.client)
          }
          if self.password:
              secondary_login['password'] = self.password
          if mongo_version >= (3, 7, 2):
              # Use SCRAM_SHA-1 so that pymongo < 3.7 can authenticate.
              secondary_login['mechanisms'] = ['SCRAM-SHA-1']
          db.add_user(**secondary_login)
docs: Add given user, and extra x509 user if necessary.