'Write self.num_threads if set as the num_threads OpenMP directive'

def put_num_threads(self, code):

    if (self.num_threads is not None):
        code.put(('    num_threads(%s)' % self.evaluate_before_block(code, self.num_threads)))
