<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def purge(root=os.path.join(base.data_dir(), 'models')):
 r"""Purge all pretrained model files in local file store. Parameters root : str, default '$MXNET_HOME/models' Location for keeping the model parameters. """

    root = os.path.expanduser(root)
    files = os.listdir(root)
    for f in files:
        if f.endswith(".params"):
            os.remove(os.path.join(root, f))