docs: def _setup_trunk(self, trunk, vlan_id=None):
          """Sets up VLAN trunk and updates the trunk status."""
  
          LOG.info('Binding trunk port: %s.', trunk)
          try:
              # bind sub_ports to host.
              self._trunk_rpc.update_subport_bindings(self._context,
                                                      trunk.sub_ports)
  
              vlan_trunk = [s.segmentation_id for s in trunk.sub_ports]
              self._set_port_vlan(trunk.port_id, vlan_id, vlan_trunk)
  
              self._trunk_rpc.update_trunk_status(self._context, trunk.id,
                                                  t_const.ACTIVE_STATUS)
          except Exception:
              # something broke
              LOG.exception("Failure setting up subports for %s", trunk.port_id)
              self._trunk_rpc.update_trunk_status(self._context, trunk.id,
                                                  t_const.DEGRADED_STATUS)