Whitelisted method for serial no

Hi
I want to create my own doctype that has a serial_no_series field, same as ‘item master’. I googled to find info on the format for this serial_no_series field e.g.

BB-.YY.MM.-01-###
Must the placeholders (YY & MM) be sorrounded by periods , or just start with a period. Cant find any info on this. Can someone help.

Also,
Is there a whitelisted method that I can call to read the serial_no_series field and use the info to generate a serial_no?

I found the ‘make_autoname’ method in

frappe.model.naming .... naming.py

but it is not whitelisted. I tried it in console and it would have worked nice.

Surely there must be a whitelisted method that I can call ?