#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Time-stamp: "2024-09-15 09:39:02 (ywatanabe)"
# /home/ywatanabe/proj/_mngs_repo_openhands/src/mngs/plt/ax/_format_label.py


def format_label(label):
    """
    Format label by capitalizing first letter and replacing underscores with spaces.
    """

    # if isinstance(label, str):
    #     # Replace underscores with spaces
    #     label = label.replace("_", " ")

    #     # Capitalize first letter of each word
    #     label = " ".join(word.capitalize() for word in label.split())

    #     # Special case for abbreviations (all caps)
    #     if label.isupper():
    #         return label

    return label
