code: def gate(self, gate, apply_now=True):
          '''
          Apply given gate and return new gated sample (with assigned data).
  
          Parameters
          ----------
          gate : {_gate_available_classes}
  
          Returns
          -------
  
          FCMeasurement
              Sample with data that passes gates
          '''
          data = self.get_data()
          newdata = gate(data)
          newsample = self.copy()
          newsample.data = newdata
          return newsamplf gate(self, gate, apply_now=True):
          '''
          Apply given gate and return new gated sample (with assigned data).
  
          Parameters
          ----------
          gate : {_gate_available_classes}
  
          Returns
          -------
  
          FCMeasurement
              Sample with data that passes gates
          '''
          data = self.get_data()
          newdata = gate(data)
          newsample = self.copy()
          newsample.data = newdata
          return newsample
docs: Apply given gate and return new gated sample (with assigned data).
  
          Parameters
          ----------
          gate : {_gate_available_classes}
  
          Returns
          -------
  
          FCMeasurement
              Sample with data that passes gates