<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def local_ref(*parts):
 """ Returns an effect that returns a local reference constructed from the given factory arguments joined with the context's 'key'. This is a reference builder with a specified base location: Using getter.local_ref("some", "base") to get a value with context key "toto" will give reference.Local("some", "base", "toto") """


    def local_ref(_value, context, **_params):
        return reference.Local(*(parts + (context["key"], )))

    return local_ref