docs: def register_descriptors(self, descriptor_schemas, user, force=False, verbosity=1):
          """Read and register descriptors."""
          log_descriptors = []
  
          for descriptor_schema in descriptor_schemas:
              for schema, _, _ in iterate_schema({}, descriptor_schema.get('schema', {})):
                  if not schema['type'][-1].endswith(':'):
                      schema['type'] += ':'
  
              if 'schema' not in descriptor_schema:
                  descriptor_schema['schema'] = []
  
              if not self.valid(descriptor_schema, DESCRIPTOR_SCHEMA):
                  continue
  
              slug = descriptor_schema['slug']
              version = descriptor_schema.get('version', '0.0.0')
              int_version = convert_version_string_to_int(version, VERSION_NUMBER_BITS)
  
              # `latest version` is returned as `int` so it has to be compared to `int_version`
              latest_version = DescriptorSchema.objects.filter(slug=slug).aggregate(Max('version'))['version__max']
              if latest_version is not None and latest_version > int_version:
                  self.stderr.write("Skip descriptor schema {}: newer version installed".format(slug))
                  continue
  
              previous_descriptor_qs = DescriptorSchema.objects.filter(slug=slug)
              if previous_descriptor_qs.exists():
                  previous_descriptor = previous_descriptor_qs.latest()
              else:
                  previous_descriptor = None
  
              descriptor_query = DescriptorSchema.objects.filter(slug=slug, version=version)
              if descriptor_query.exists():
                  if not force:
                      if verbosity > 0:
                          self.stdout.write("Skip descriptor schema {}: same version installed".format(slug))
                      continue
  
                  descriptor_query.update(**descriptor_schema)
                  log_descriptors.append("Updated {}".format(slug))
              else:
                  descriptor = DescriptorSchema.objects.create(contributor=user, **descriptor_schema)
                  assign_contributor_permissions(descriptor)
                  if previous_descriptor:
                      copy_permissions(previous_descriptor, descriptor)
                  log_descriptors.append("Inserted {}".format(slug))
  
          if log_descriptors and verbosity > 0:
              self.stdout.write("Descriptor schemas Updates:")
              for log in log_descriptors:
                  self.stdout.write("  {}".format(log))