We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUILD: what is generate_mtrand_c.py ?
xref #13163 

Does anyone know what is ['numpy/random/mtrand/generate_mtrand_c.py'](https://github.com/numpy/numpy/blob/v1.16.2/numpy/random/mtrand/generate_mtrand_c.py) and why it is in ['MANIFEST.in'](https://github.com/numpy/numpy/blob/v1.16.2/MANIFEST.in#L11) ? Is it used by some downstream package? It does not seem to be used in [creating the wheels](https://github.com/MacPython/numpy-wheels)

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `numpy/random/mtrand/generate_mtrand_c.py`
Content:
```
1 #!/usr/bin/env python
2 from __future__ import division, absolute_import, print_function
3 
4 import sys
5 import re
6 import os
7 
8 unused_internal_funcs = ['__Pyx_PrintItem',
9                          '__Pyx_PrintNewline',
10                          '__Pyx_ReRaise',
11                          #'__Pyx_GetExcValue',
12                          '__Pyx_ArgTypeTest',
13                          '__Pyx_SetVtable',
14                          '__Pyx_GetVtable',
15                          '__Pyx_CreateClass']
16 
17 if __name__ == '__main__':
18     # Use cython here so that long docstrings are broken up.
19     # This is needed for some VC++ compilers.
20     os.system('cython mtrand.pyx')
21     mtrand_c = open('mtrand.c', 'r')
22     processed = open('mtrand_pp.c', 'w')
23     unused_funcs_str = '(' + '|'.join(unused_internal_funcs) + ')'
24     uifpat = re.compile(r'static \w+ \*?'+unused_funcs_str+r'.*/\*proto\*/')
25     linepat = re.compile(r'/\* ".*/mtrand.pyx":')
26     for linenum, line in enumerate(mtrand_c):
27         m = re.match(r'^(\s+arrayObject\w*\s*=\s*[(])[(]PyObject\s*[*][)]',
28                      line)
29         if m:
30             line = '%s(PyArrayObject *)%s' % (m.group(1), line[m.end():])
31         m = uifpat.match(line)
32         if m:
33             line = ''
34         m = re.search(unused_funcs_str, line)
35         if m:
36             print("%s was declared unused, but is used at line %d" % (m.group(),
37                                                                     linenum+1), file=sys.stderr)
38         line = linepat.sub(r'/* "mtrand.pyx":', line)
39         processed.write(line)
40     mtrand_c.close()
41     processed.close()
42     os.rename('mtrand_pp.c', 'mtrand.c')
43
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/numpy/random/mtrand/generate_mtrand_c.py b/numpy/random/mtrand/generate_mtrand_c.py
deleted file mode 100644
--- a/numpy/random/mtrand/generate_mtrand_c.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env python
-from __future__ import division, absolute_import, print_function
-
-import sys
-import re
-import os
-
-unused_internal_funcs = ['__Pyx_PrintItem',
-                         '__Pyx_PrintNewline',
-                         '__Pyx_ReRaise',
-                         #'__Pyx_GetExcValue',
-                         '__Pyx_ArgTypeTest',
-                         '__Pyx_SetVtable',
-                         '__Pyx_GetVtable',
-                         '__Pyx_CreateClass']
-
-if __name__ == '__main__':
-    # Use cython here so that long docstrings are broken up.
-    # This is needed for some VC++ compilers.
-    os.system('cython mtrand.pyx')
-    mtrand_c = open('mtrand.c', 'r')
-    processed = open('mtrand_pp.c', 'w')
-    unused_funcs_str = '(' + '|'.join(unused_internal_funcs) + ')'
-    uifpat = re.compile(r'static \w+ \*?'+unused_funcs_str+r'.*/\*proto\*/')
-    linepat = re.compile(r'/\* ".*/mtrand.pyx":')
-    for linenum, line in enumerate(mtrand_c):
-        m = re.match(r'^(\s+arrayObject\w*\s*=\s*[(])[(]PyObject\s*[*][)]',
-                     line)
-        if m:
-            line = '%s(PyArrayObject *)%s' % (m.group(1), line[m.end():])
-        m = uifpat.match(line)
-        if m:
-            line = ''
-        m = re.search(unused_funcs_str, line)
-        if m:
-            print("%s was declared unused, but is used at line %d" % (m.group(),
-                                                                    linenum+1), file=sys.stderr)
-        line = linepat.sub(r'/* "mtrand.pyx":', line)
-        processed.write(line)
-    mtrand_c.close()
-    processed.close()
-    os.rename('mtrand_pp.c', 'mtrand.c')

{"golden_diff": "diff --git a/numpy/random/mtrand/generate_mtrand_c.py b/numpy/random/mtrand/generate_mtrand_c.py\ndeleted file mode 100644\n--- a/numpy/random/mtrand/generate_mtrand_c.py\n+++ /dev/null\n@@ -1,42 +0,0 @@\n-#!/usr/bin/env python\n-from __future__ import division, absolute_import, print_function\n-\n-import sys\n-import re\n-import os\n-\n-unused_internal_funcs = ['__Pyx_PrintItem',\n-                         '__Pyx_PrintNewline',\n-                         '__Pyx_ReRaise',\n-                         #'__Pyx_GetExcValue',\n-                         '__Pyx_ArgTypeTest',\n-                         '__Pyx_SetVtable',\n-                         '__Pyx_GetVtable',\n-                         '__Pyx_CreateClass']\n-\n-if __name__ == '__main__':\n-    # Use cython here so that long docstrings are broken up.\n-    # This is needed for some VC++ compilers.\n-    os.system('cython mtrand.pyx')\n-    mtrand_c = open('mtrand.c', 'r')\n-    processed = open('mtrand_pp.c', 'w')\n-    unused_funcs_str = '(' + '|'.join(unused_internal_funcs) + ')'\n-    uifpat = re.compile(r'static \\w+ \\*?'+unused_funcs_str+r'.*/\\*proto\\*/')\n-    linepat = re.compile(r'/\\* \".*/mtrand.pyx\":')\n-    for linenum, line in enumerate(mtrand_c):\n-        m = re.match(r'^(\\s+arrayObject\\w*\\s*=\\s*[(])[(]PyObject\\s*[*][)]',\n-                     line)\n-        if m:\n-            line = '%s(PyArrayObject *)%s' % (m.group(1), line[m.end():])\n-        m = uifpat.match(line)\n-        if m:\n-            line = ''\n-        m = re.search(unused_funcs_str, line)\n-        if m:\n-            print(\"%s was declared unused, but is used at line %d\" % (m.group(),\n-                                                                    linenum+1), file=sys.stderr)\n-        line = linepat.sub(r'/* \"mtrand.pyx\":', line)\n-        processed.write(line)\n-    mtrand_c.close()\n-    processed.close()\n-    os.rename('mtrand_pp.c', 'mtrand.c')\n", "issue": "BUILD: what is generate_mtrand_c.py ?\nxref #13163 \r\n\r\nDoes anyone know what is ['numpy/random/mtrand/generate_mtrand_c.py'](https://github.com/numpy/numpy/blob/v1.16.2/numpy/random/mtrand/generate_mtrand_c.py) and why it is in ['MANIFEST.in'](https://github.com/numpy/numpy/blob/v1.16.2/MANIFEST.in#L11) ? Is it used by some downstream package? It does not seem to be used in [creating the wheels](https://github.com/MacPython/numpy-wheels)\n", "before_files": [{"content": "#!/usr/bin/env python\nfrom __future__ import division, absolute_import, print_function\n\nimport sys\nimport re\nimport os\n\nunused_internal_funcs = ['__Pyx_PrintItem',\n                         '__Pyx_PrintNewline',\n                         '__Pyx_ReRaise',\n                         #'__Pyx_GetExcValue',\n                         '__Pyx_ArgTypeTest',\n                         '__Pyx_SetVtable',\n                         '__Pyx_GetVtable',\n                         '__Pyx_CreateClass']\n\nif __name__ == '__main__':\n    # Use cython here so that long docstrings are broken up.\n    # This is needed for some VC++ compilers.\n    os.system('cython mtrand.pyx')\n    mtrand_c = open('mtrand.c', 'r')\n    processed = open('mtrand_pp.c', 'w')\n    unused_funcs_str = '(' + '|'.join(unused_internal_funcs) + ')'\n    uifpat = re.compile(r'static \\w+ \\*?'+unused_funcs_str+r'.*/\\*proto\\*/')\n    linepat = re.compile(r'/\\* \".*/mtrand.pyx\":')\n    for linenum, line in enumerate(mtrand_c):\n        m = re.match(r'^(\\s+arrayObject\\w*\\s*=\\s*[(])[(]PyObject\\s*[*][)]',\n                     line)\n        if m:\n            line = '%s(PyArrayObject *)%s' % (m.group(1), line[m.end():])\n        m = uifpat.match(line)\n        if m:\n            line = ''\n        m = re.search(unused_funcs_str, line)\n        if m:\n            print(\"%s was declared unused, but is used at line %d\" % (m.group(),\n                                                                    linenum+1), file=sys.stderr)\n        line = linepat.sub(r'/* \"mtrand.pyx\":', line)\n        processed.write(line)\n    mtrand_c.close()\n    processed.close()\n    os.rename('mtrand_pp.c', 'mtrand.c')\n", "path": "numpy/random/mtrand/generate_mtrand_c.py"}], "after_files": [{"content": null, "path": "numpy/random/mtrand/generate_mtrand_c.py"}]}