<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_field(expr, field):
 """ Fetch a field from a struct expr """

    weld_obj = WeldObject(encoder_, decoder_)

    struct_var = weld_obj.update(expr)
    if isinstance(expr, WeldObject):
        struct_var = expr.obj_id
        weld_obj.dependencies[struct_var] = expr

    weld_template = """
      %(struct)s.$%(field)s
    """

    weld_obj.weld_code = weld_template % {"struct":struct_var,
                                          "field":field}
    return weld_obj