<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_argument_subquery(arg):
 """ Decide when a Join argument needs to be wrapped in a subquery """

        return Subquery.create(arg) if isinstance(arg, (GroupBy, Projection)) or arg.restriction else arg