def METHOD_NAME(self, record: logging.LogRecord):
    if record.name == "prefect.flow_runs":
        style = self._flow_run_style
    elif record.name == "prefect.task_runs":
        style = self._task_run_style
    else:
        style = self._style
    return style.format(record)