def METHOD_NAME(records):
    """Create and reserve OAI identifiers for the records.
    This will create OAI PIDs for the records and their drafts.
    We skip drafts that aren't published, because they'll get their
    OAI PIDs upon publication.
    """
    service = current_rdm_records_service
    pid_manager = service.pids.pid_manager
    for record in records:
        # skip records that already have some kind of OAI PID set
        if "oai" in record.pids:
            secho(
                f"Skipping record '{record.pid.pid_value}', as there's "
                f"already an OAI PID registered: {record.pids['oai']}",
                fg="yellow",
            )
            continue
        # create and set the OAI PID for the record
        oai_pid = pid_manager.create(record, "oai", None)
        record.pids["oai"] = oai_pid
        record.commit()
        # set the OAI PID for the draft as well, if there is one
        try:
            draft = service.draft_cls.pid.resolve(
                record.pid.pid_value, registered_only=False
            )
            if not draft.is_deleted:
                draft.pids["oai"] = oai_pid
                draft.commit()
        except Exception:
            pass
        # reserve the OAI PID
        pid_manager.reserve(
            record, "oai", oai_pid["identifier"], oai_pid["provider"]
        )