def translate_attribute(metasra_attribute: dict) -> dict:
    """Translate a MetaSRA attribute that looks like this:
        {
            "property_id": "EFO:0000246",
            "unit_id": "missing",
            "value": 31.0
        }
    into our representation documented here:
    https://github.com/AlexsLemonade/refinebio/issues/2127#issuecomment-591651893
    """

    attribute = {"value": metasra_attribute["value"]}

    if metasra_attribute["unit_id"] != "missing":
        attribute["unit"] = metasra_attribute["unit_id"]

    return {metasra_attribute["property_id"]: attribute}