from pathlib import Path


def _get_uml_filename(module_filename) -> str:
    """
    Return the UML file name, for a given Python module name.
    :param module_filename: e.g. cylc.flow.ws_messages_proto.pb2.
    :type module_filename: str
    :return: UML file name (e.g. ws_messages_proto).
    :rtype: str
    """
    return Path(module_filename).stem