def dump_c(self, routines, f, prefix):
        functions = []
        function_creation = []
        ufunc_init = []
        module = self.module_name
        include_file = "\"{0}.h\"".format(prefix)
        top = _ufunc_top.substitute(include_file=include_file, module=module)

        for r_index, routine in enumerate(routines):
            name = routine.name

            # Partition the C function arguments into categories
            py_in, py_out = self._partition_args(routine.arguments)
            n_in = len(py_in)
            n_out = 1

            # Declare Args
            form = "char *{0}{1} = args[{2}];"
            arg_decs = [form.format('in', i, i) for i in range(n_in)]
            arg_decs.append(form.format('out', 1, n_in))
            declare_args = '\n    '.join(arg_decs)

            # Declare Steps
            form = "npy_intp {0}{1}_step = steps[{2}];"
            step_decs = [form.format('in', i, i) for i in range(n_in)]
            step_decs.append(form.format('out', 1, n_in))
            declare_steps = '\n    '.join(step_decs)

            # Call Args
            form = "*(double *)in{0}"
            call_args = ', '.join([form.format(a) for a in range(n_in)])

            # Step Increments
            form = "{0}{1} += {0}{1}_step;"
            step_incs = [form.format('in', i) for i in range(n_in)]
            step_incs.append(form.format('out', 1))
            step_increments = '\n        '.join(step_incs)

            # Types
            n_types = n_in + n_out
            types = "{" + ', '.join(["NPY_DOUBLE"]*n_types) + "};"

            # Docstring
            docstring = '"Created in SymPy with Ufuncify"'

            # Function Creation
            function_creation.append("PyObject *ufunc{0};".format(r_index))

            # Ufunc initialization
            init_form = _ufunc_init_form.substitute(module=module,
                                                    funcname=name,
                                                    docstring=docstring,
                                                    n_in=n_in, n_out=n_out,
                                                    ind=r_index)
            ufunc_init.append(init_form)

            body = _ufunc_body.substitute(module=module, funcname=name,
                                          declare_args=declare_args,
                                          declare_steps=declare_steps,
                                          call_args=call_args,
                                          step_increments=step_increments,
                                          n_types=n_types, types=types)
            functions.append(body)

        body = '\n\n'.join(functions)
        ufunc_init = '\n    '.join(ufunc_init)
        function_creation = '\n    '.join(function_creation)
        bottom = _ufunc_bottom.substitute(module=module,
                                          ufunc_init=ufunc_init,
                                          function_creation=function_creation)
        text = [top, body, bottom]
        f.write('\n\n'.join(text))
Select the overload of a host.
dataset/ETHPy150Open sympy/sympy/sympy/utilities/autowrap.py/UfuncifyCodeWrapper.dump_c--crossover with--dataset/ETHPy150Open beloglazov/openstack-neat/utils/db.py/Database.select_host_overload