docs: def create(self, metadata, publisher_account,
                 service_descriptors=None, providers=None,
                 use_secret_store=True):
          """
          Register an asset in both the keeper's DIDRegistry (on-chain) and in the Metadata store (
          Aquarius).
  
          :param metadata: dict conforming to the Metadata accepted by Ocean Protocol.
          :param publisher_account: Account of the publisher registering this asset
          :param service_descriptors: list of ServiceDescriptor tuples of length 2.
              The first item must be one of ServiceTypes and the second
              item is a dict of parameters and values required by the service
          :param providers: list of addresses of providers of this asset (a provider is
              an ethereum account that is authorized to provide asset services)
          :return: DDO instance
          """
          assert isinstance(metadata, dict), f'Expected metadata of type dict, got {type(metadata)}'
          if not metadata or not Metadata.validate(metadata):
              raise OceanInvalidMetadata('Metadata seems invalid. Please make sure'
                                         ' the required metadata values are filled in.')
  
          # copy metadata so we don't change the original
          metadata_copy = copy.deepcopy(metadata)
  
          # Create a DDO object
          did = DID.did()
          logger.debug(f'Generating new did: {did}')
          # Check if it's already registered first!
          if did in self._get_aquarius().list_assets():
              raise OceanDIDAlreadyExist(
                  f'Asset id {did} is already registered to another asset.')
  
          ddo = DDO(did)
  
          # Add public key and authentication
          ddo.add_public_key(did, publisher_account.address)
          ddo.add_authentication(did, PUBLIC_KEY_TYPE_RSA)
  
          # Setup metadata service
          # First replace `files` with encrypted `files`
          assert metadata_copy['base'][
              'files'], 'files is required in the metadata base attributes.'
          assert Metadata.validate(metadata), 'metadata seems invalid.'
          logger.debug('Encrypting content urls in the metadata.')
          brizo = BrizoProvider.get_brizo()
          if not use_secret_store:
              encrypt_endpoint = brizo.get_encrypt_endpoint(self._config)
              files_encrypted = brizo.encrypt_files_dict(
                  metadata_copy['base']['files'],
                  encrypt_endpoint,
                  ddo.asset_id,
                  publisher_account.address,
                  self._keeper.sign_hash(ddo.asset_id, publisher_account)
              )
          else:
              files_encrypted = self._get_secret_store(publisher_account) \
                  .encrypt_document(
                  did_to_id(did),
                  json.dumps(metadata_copy['base']['files']),
              )
  
          metadata_copy['base']['checksum'] = ddo.generate_checksum(did, metadata)
          ddo.add_proof(metadata_copy['base']['checksum'], publisher_account, self._keeper)
  
          # only assign if the encryption worked
          if files_encrypted:
              logger.info(f'Content urls encrypted successfully {files_encrypted}')
              index = 0
              for file in metadata_copy['base']['files']:
                  file['index'] = index
                  index = index + 1
                  del file['url']
              metadata_copy['base']['encryptedFiles'] = files_encrypted
          else:
              raise AssertionError('Encrypting the files failed. Make sure the secret store is'
                                   ' setup properly in your config file.')
  
          # DDO url and `Metadata` service
          ddo_service_endpoint = self._get_aquarius().get_service_endpoint(did)
          metadata_service_desc = ServiceDescriptor.metadata_service_descriptor(metadata_copy,
                                                                                ddo_service_endpoint)
          if not service_descriptors:
              service_descriptors = [ServiceDescriptor.authorization_service_descriptor(
                  self._config.secret_store_url)]
              brizo = BrizoProvider.get_brizo()
              service_descriptors += [ServiceDescriptor.access_service_descriptor(
                  metadata[MetadataBase.KEY]['price'],
                  brizo.get_consume_endpoint(self._config),
                  brizo.get_service_endpoint(self._config),
                  3600,
                  self._keeper.escrow_access_secretstore_template.address
              )]
          else:
              service_types = set(map(lambda x: x[0], service_descriptors))
              if ServiceTypes.AUTHORIZATION not in service_types:
                  service_descriptors += [ServiceDescriptor.authorization_service_descriptor(
                      self._config.secret_store_url)]
              else:
                  brizo = BrizoProvider.get_brizo()
                  service_descriptors += [ServiceDescriptor.access_service_descriptor(
                      metadata[MetadataBase.KEY]['price'],
                      brizo.get_consume_endpoint(self._config),
                      brizo.get_service_endpoint(self._config),
                      3600,
                      self._keeper.escrow_access_secretstore_template.address
                  )]
  
          # Add all services to ddo
          service_descriptors = service_descriptors + [metadata_service_desc]
          for service in ServiceFactory.build_services(did, service_descriptors):
              ddo.add_service(service)
  
          logger.debug(
              f'Generated ddo and services, DID is {ddo.did},'
              f' metadata service @{ddo_service_endpoint}, '
              f'`Access` service initialize @{ddo.services[0].endpoints.service}.')
          response = None
          # register on-chain
          registered_on_chain = self._keeper.did_registry.register(
              did,
              checksum=Web3Provider.get_web3().sha3(text=metadata_copy['base']['checksum']),
              url=ddo_service_endpoint,
              account=publisher_account,
              providers=providers
          )
          if registered_on_chain is False:
              logger.warning(f'Registering {did} on-chain failed.')
              return None
          logger.info(f'DDO with DID {did} successfully registered on chain.')
          try:
              # publish the new ddo in ocean-db/Aquarius
              response = self._get_aquarius().publish_asset_ddo(ddo)
              logger.debug('Asset/ddo published successfully in aquarius.')
          except ValueError as ve:
              raise ValueError(f'Invalid value to publish in the metadata: {str(ve)}')
          except Exception as e:
              logger.error(f'Publish asset in aquarius failed: {str(e)}')
          if not response:
              return None
          return ddo