def METHOD_NAME(action: str, stac: dict):
    """Determine SNS message attributes"""
    product = dicttoolz.get_in(["properties", "odc:product"], stac)
    date_time = dicttoolz.get_in(["properties", "datetime"], stac)
    maturity = dicttoolz.get_in(["properties", "dea:dataset_maturity"], stac)
    if not product:
        product = stac.get("collection")
    return {
        "action": {"DataType": "String", "StringValue": action},
        "product": {"DataType": "String", "StringValue": product},
        "datetime": {"DataType": "String", "StringValue": date_time},
        **(
            {"maturity": {"DataType": "String", "StringValue": maturity}}
            if maturity
            else {}
        ),
    }