code: def set_meter(self, meter):
          
          # warning should raise exception
          if _meter.valid_beat_duration(meter[1]):
              self.meter = (meter[0], meter[1])
              self.length = meter[0] * (1.0 / meter[1])
          elif meter == (0, 0):
              self.meter = (0, 0)
              self.length = 0.0
          else:
              raise MeterFormatError("The meter argument '%s' is not an "
                      "understood representation of a meter. "
                      "Expecting a tuple." % meter)
docs: Set the meter of this bar.
  
          Meters in mingus are represented by a single tuple.
  
          If the format of the meter is not recognised, a MeterFormatError
          will be raised.