'Returns the opening statements of the routine.'

def _get_routine_opening(self, routine):

    code_list = []
    code_list.append('function    ')
    outs = []
    for (i, result) in enumerate(routine.results):
        if isinstance(result, Result):
            s = self._get_symbol(result.name)
        else:
            raise CodeGenError('unexpected    object    in    Routine    results')
        outs.append(s)
    if (len(outs) > 1):
        code_list.append((('[' + ',    '.join(outs)) + ']'))
    else:
        code_list.append(''.join(outs))
    code_list.append('    =    ')
    args = []
    for (i, arg) in enumerate(routine.arguments):
        if isinstance(arg, (OutputArgument, InOutArgument)):
            raise CodeGenError(('Octave:    invalid    argument    of    type    %s' % str(type(arg))))
        if isinstance(arg, InputArgument):
            args.append(('%s' % self._get_symbol(arg.name)))
    args = ',    '.join(args)
    code_list.append(('%s(%s)\n' % (routine.name, args)))
    code_list = [''.join(code_list)]
    return code_list
