docs: def create(source, ids, force, pid_minter=None):
      """Create new bibliographic record(s)."""
      records_deprecation_warning()
  
      # Make sure that all imports are done with application context.
      from .api import Record
      from .models import RecordMetadata
  
      pid_minter = [process_minter(minter) for minter in pid_minter or []]
  
      data = json.load(source)
  
      if isinstance(data, dict):
          data = [data]
  
      if ids:
          assert len(ids) == len(data), 'Not enough identifiers.'
  
      for record, id_ in zip_longest(data, ids):
          id_ = id_ or uuid.uuid4()
          try:
              for minter in pid_minter:
                  minter(id_, record)
  
              click.echo(Record.create(record, id_=id_).id)
          except exc.IntegrityError:
              if force:
                  current_app.logger.warning(
                      "Trying to force insert: {0}".format(id_))
                  # IMPORTANT: We need to create new transaction for
                  # SQLAlchemy-Continuum as we are using no auto-flush
                  # in Record.get_record.
                  vm = current_app.extensions['invenio-db'].versioning_manager
                  uow = vm.unit_of_work(db.session)
                  uow.create_transaction(db.session)
                  # Use low-level database model to retrieve an instance.
                  model = RecordMetadata.query.get(id_)
                  rec = Record(record, model=model).commit()
                  current_app.logger.info("Created new revision {0}".format(
                      rec.revision_id))
                  click.echo(rec.id)
              else:
                  raise click.BadParameter(
                      'Record with id={0} already exists. If you want to '
                      'override its data use --force.'.format(id_),
                      param_hint='ids',
                  )
          db.session.flush()
      db.session.commit()