def lookup_expr(collection, key):
    """
    Lookup a value in a Weld vector. This will add a cast for the key to an `I64`.

    Examples
    --------
    >>> lookup_expr("v", "i64(1.0f)").code
    'lookup(v, i64(i64(1.0f)))'
    >>> lookup_expr("[1,2,3]", "1.0f").code
    'lookup([1,2,3], i64(1.0f))'
    >>> lookup_expr("[1,2,3]", 1).code
    'lookup([1,2,3], i64(1))'

    """
    return "lookup({collection}, i64({key}))".format(
            collection=collection,
            key=key)