def METHOD_NAME():
    client = boto3.client("sns", region_name="us-east-1")
    topic_arn = client.create_topic(Name="standard_topic")["TopicArn"]
    entries = [
        {"Id": "id_1", "Message": "1"},
        {"Id": "id_2", "Message": "2", "MessageGroupId": "mgid"},
        {"Id": "id_3", "Message": "3"},
    ]
    resp = client.publish_batch(TopicArn=topic_arn, PublishBatchRequestEntries=entries)
    assert len(resp["Successful"]) == 2
    for message_status in resp["Successful"]:
        assert "MessageId" in message_status
    assert [m["Id"] for m in resp["Successful"]] == ["id_1", "id_3"]
    assert len(resp["Failed"]) == 1
    assert resp["Failed"][0] == {
        "Id": "id_2",
        "Code": "InvalidParameter",
        "Message": (
            "Invalid parameter: MessageGroupId Reason: The request includes "
            "MessageGroupId parameter that is not valid for this topic type"
        ),
        "SenderFault": True,
    }