docs: def switch_update_record_with_switch(self, userid, interface,
                                           switch=None):
          """Update information in switch table."""
          if not self._get_switch_by_user_interface(userid, interface):
              msg = "User %s with nic %s does not exist in DB" % (userid,
                                                                  interface)
              LOG.error(msg)
              obj_desc = ('User %s with nic %s' % (userid, interface))
              raise exception.SDKObjectNotExistError(obj_desc,
                                                     modID=self._module_id)
  
          if switch is not None:
              with get_network_conn() as conn:
                  conn.execute("UPDATE switch SET switch=? "
                               "WHERE userid=? and interface=?",
                               (switch, userid, interface))
                  LOG.debug("Set switch to %s for user %s with nic %s "
                            "in switch table" %
                            (switch, userid, interface))
          else:
              with get_network_conn() as conn:
                  conn.execute("UPDATE switch SET switch=NULL "
                               "WHERE userid=? and interface=?",
                               (userid, interface))
                  LOG.debug("Set switch to None for user %s with nic %s "
                            "in switch table" %
                            (userid, interface))