code: def level(self):
          
          m = re.match(
              self.compliance_prefix +
              r'(\d)' +
              self.compliance_suffix +
              r'$',
              self.compliance)
          if (m):
              return int(m.group(1))
          raise IIIFInfoError(
              "Bad compliance profile URI, failed to extract level number")
docs: Extract level number from compliance profile URI.
  
          Returns integer level number or raises IIIFInfoError