code: def get_lower_supported(cls, previous_version):
          
          try:
              version = next(v for v in sorted(ProtocolVersion.SUPPORTED_VERSIONS, reverse=True) if
                             v not in ProtocolVersion.BETA_VERSIONS and v < previous_version)
          except StopIteration:
              version = 0
  
          return version
docs: Return the lower supported protocol version. Beta versions are omitted.