<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _log(self, num=None, format=None):
        '''
        Helper function to receive git log

        :param num:
            Number of entries
        :param format:
            Use formatted output with specified format string
        '''

        num = '-n %s' % (num) if num else ''
        format = '--format="%s"' % (format) if format else ''
        return self.m(
            'getting git log',
            cmdd=dict(cmd='git log %s %s' % (num, format), cwd=self.local),
            verbose=False
        )