code: def _validate_controls(self, proposal):
          '''Validate controls list.
  
          Makes sure only one instance of any given layer can exist in the
          controls list.
          '''
          self._control_ids = [c.model_id for c in proposal.value]
          if len(set(self._control_ids)) != len(self._control_ids):
              raise ControlException('duplicate control detected, only use each control once')
          return proposal.valuf _validate_controls(self, proposal):
          '''Validate controls list.
  
          Makes sure only one instance of any given layer can exist in the
          controls list.
          '''
          self._control_ids = [c.model_id for c in proposal.value]
          if len(set(self._control_ids)) != len(self._control_ids):
              raise ControlException('duplicate control detected, only use each control once')
          return proposal.value
docs: Validate controls list.
  
          Makes sure only one instance of any given layer can exist in the
          controls list.