def METHOD_NAME(self):
    self.assertEqual(
        helpers.expand_action({"_source": {"key": "val"}}),
        ({"index": {}}, {"key": "val"}),
    )
    self.assertEqual(
        helpers.expand_action(
            {"_source": ["key"], "key": "val", "_op_type": "update"}
        ),
        ({"update": {"_source": ["key"]}}, {"key": "val"}),
    )
    self.assertEqual(
        helpers.expand_action(
            {"_source": True, "key": "val", "_op_type": "update"}
        ),
        ({"update": {"_source": True}}, {"key": "val"}),
    )
    # This case is only to ensure backwards compatibility with old functionality.
    self.assertEqual(
        helpers.expand_action(
            {"_source": {"key2": "val2"}, "key": "val", "_op_type": "update"}
        ),
        ({"update": {}}, {"key2": "val2"}),
    )