def write_scatterfunction_header(self, scattername):
        """

        :return:
        """
        scatter_inputs = self.fetch_scatter_inputs(scattername)

        fn_section = '\n\nclass {jobname}Cls(Job):\n'.format(jobname=scattername)
        fn_section += '    def __init__(self, '
        for input in scatter_inputs:
            fn_section += '{input}=None, '.format(input=input)
        fn_section += '*args, **kwargs):\n'
        fn_section += '        Job.__init__(self)\n\n'

        for input in scatter_inputs:
            fn_section += '        self.id_{input} = {input}\n'.format(input=input)

        fn_section += heredoc_wdl('''

                             def run(self, fileStore):
                                 fileStore.logToMaster("{jobname}")
                                 tempDir = fileStore.getLocalTempDir()
                                 
                                 try:
                                     os.makedirs(os.path.join(tempDir, 'execution'))
                                 except OSError as e:
                                     if e.errno != errno.EEXIST:
                                         raise
                                 ''', {'jobname': scattername}, indent='    ')[1:]
        for input in scatter_inputs:
            fn_section += '        {input} = self.id_{input}\n'.format(input=input)
        return fn_section
def write_scatterfunction_header ( self , scattername ) : scatter_inputs = self . fetch_scatter_inputs ( scattername ) fn_section = '\n\nclass {jobname}Cls(Job):\n' . format ( jobname = scattername ) fn_section += '    def __init__(self, ' for input in scatter_inputs : fn_section += '{input}=None, ' . format ( input = input ) fn_section += '*args, **kwargs):\n' fn_section += '        Job.__init__(self)\n\n' for input in scatter_inputs : fn_section += '        self.id_{input} = {input}\n' . format ( input = input ) fn_section += heredoc_wdl ( '''
                             def run(self, fileStore):
                                 fileStore.logToMaster("{jobname}")
                                 tempDir = fileStore.getLocalTempDir()
                                 try:
                                     os.makedirs(os.path.join(tempDir, 'execution'))
                                 except OSError as e:
                                     if e.errno != errno.EEXIST:
                                         raise
                                 ''' , { 'jobname' : scattername } , indent = '    ' ) [ 1 : ] for input in scatter_inputs : fn_section += '        {input} = self.id_{input}\n' . format ( input = input ) return fn_section
:return: