<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pattern(head, *args, mode=1, wc_name=None, conditions=None, **kwargs) \ -> Pattern: """'Flat' constructor for the Pattern class Positional and keyword arguments are mapped into `args` and `kwargs`, respectively. Useful for defining rules that match an instantiated Expression with specific arguments """

    if len(args) == 0:
        args = None
    if len(kwargs) == 0:
        kwargs = None
    return Pattern(head, args, kwargs, mode=mode, wc_name=wc_name,
                   conditions=conditions)