Here is the example python template
from earlier in the thread, updated to use the new signature.
Code:
python:
def evaluate(book, context):
if book.series is None:
return ''
ans = set()
db = context.db
for id_ in db.search_getting_ids(f'series:"={book.series}"', ''):
ans.update([v.strip() for v in db.new_api.field_for('author_sort', id_).split('&')])
return ', '.join(v.replace(',', ';') for v in sorted(ans))