def METHOD_NAME(excel_object: pd.ExcelFile, sheet_name: str) -> pd.DataFrame:
    # The name of the energy source is given in the very first cell.
    # To get that, I load the file, skipping all rows from the bottom.
    # The first column is the content of the first cell.
    technology = excel_object.parse(sheet_name, skipfooter=10000).columns[0]  # type: ignore
    # The format of this dataset is inconvenient and requires some adjustment that may not work on the next update.
    df = excel_object.parse(sheet_name, skiprows=4)  # type: ignore
    # There are two tables put together: One for capacity and one for production.
    # Keep only columns for capacity.
    columns_to_keep = [df.columns[0]]
    for column in df.columns[1:]:
        if str(column).startswith("PROD"):
            break
        if not str(column).startswith("Unnamed"):
            columns_to_keep.append(column)
    df = df[columns_to_keep].rename(columns={"CAP (MW)": "country"})
    # Remove empty rows.
    df = df.dropna(subset="country").reset_index(drop=True)
    # Restructure dataframe.
    df = df.melt(id_vars="country", var_name="year", value_name="capacity")
    # Add technology (referring to the name of the energy source) as a new column.
    df["technology"] = technology
    return cast(pd.DataFrame, df)