<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mock_cmd(self, release, *cmd, **kwargs):
 """Run a mock command in the chroot for a given release"""

        fmt = '{mock_cmd}'
        if kwargs.get('new_chroot') is True:
            fmt +=' --new-chroot'
        fmt += ' --configdir={mock_dir}'
        return self.call(fmt.format(**release).split()
                         + list(cmd))