def METHOD_NAME(cls, ctx, node, initialized_tables, **kwargs):
    table_node = node.inputs[0]
    while table_node.type == 'Identity':
        table_node = table_node.inputs[0]
    shared_name = table_node.get_attr_value("shared_name")
    utils.make_sure(shared_name is not None, "Could not determine table shared name for node %s", node.name)
    utils.make_sure(shared_name in initialized_tables, "Initialized table %s for node %s not found.",
                    shared_name, node.name)
    keys, _ = initialized_tables[shared_name]
    node_name = node.name
    node_outputs = node.output
    ctx.remove_node(node.name)
    size_const = ctx.make_const(node_name, np.array(len(keys), dtype=np.int64))
    ctx.replace_all_inputs(node_outputs[0], size_const.output[0])
    customer_nodes = ctx.find_output_consumers(table_node.output[0])
    if len(customer_nodes) == 0:
        ctx.remove_node(table_node.name)