[NFC][Py Reformat] Reformat python files in the rest of the dirs

This is an ongoing series of commits that are reformatting our
Python code. This catches the last of the python files to
reformat. Since they where so few I bunched them together.

Reformatting is done with `black`.

If you end up having problems merging this commit because you
have made changes to a python file, the best way to handle that
is to run git checkout --ours <yourfile> and then reformat it
with black.

If you run into any problems, post to discourse about it and
we will try to help.

RFC Thread below:

https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Reviewed By: jhenderson, #libc, Mordante, sivachandra

Differential Revision: https://reviews.llvm.org/D150784

GitOrigin-RevId: f98ee40f4b5d7474fc67e82824bf6abbaedb7b1c
diff --git a/docs/conf.py b/docs/conf.py
index b35c4a2..908f4d6 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -17,66 +17,66 @@
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+# sys.path.insert(0, os.path.abspath('.'))
 
 # -- General configuration -----------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+# needs_sphinx = '1.0'
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.todo', 'sphinx.ext.mathjax']
+extensions = ["sphinx.ext.todo", "sphinx.ext.mathjax"]
 
 # Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
+templates_path = ["_templates"]
 
 # The suffix of source filenames.
-source_suffix = '.rst'
+source_suffix = ".rst"
 
 # The encoding of source files.
-#source_encoding = 'utf-8-sig'
+# source_encoding = 'utf-8-sig'
 
 # The master toctree document.
-master_doc = 'index'
+master_doc = "index"
 
 # General information about the project.
-project = u'Polly'
-copyright = u'2010-%d, The Polly Team' % date.today().year
+project = "Polly"
+copyright = "2010-%d, The Polly Team" % date.today().year
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
-#language = None
+# language = None
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:
-#today = ''
+# today = ''
 # Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
+# today_fmt = '%B %d, %Y'
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
-exclude_patterns = ['_build', 'analyzer']
+exclude_patterns = ["_build", "analyzer"]
 
 # The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
+# default_role = None
 
 # If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
+# add_function_parentheses = True
 
 # If true, the current module name will be prepended to all description
 # unit titles (such as .. function::).
-#add_module_names = True
+# add_module_names = True
 
 # If true, sectionauthor and moduleauthor directives will be shown in the
 # output. They are ignored by default.
-#show_authors = False
+# show_authors = False
 
 # The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'friendly'
+pygments_style = "friendly"
 
 # A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
+# modindex_common_prefix = []
 
 in_progress_title = "(In-Progress) " if tags.has("PreRelease") else ""
 
@@ -90,35 +90,36 @@
 # a list of builtin themes.
 try:
     import sphinx_rtd_theme
+
     html_theme = "sphinx_rtd_theme"
     html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 except ImportError:
-    html_theme = 'haiku'
+    html_theme = "haiku"
 
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
 # documentation.
-#html_theme_options = {}
+# html_theme_options = {}
 
 # Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+# html_theme_path = []
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
-#html_title = None
+# html_title = None
 
 # A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = None
+# html_short_title = None
 
 # The name of an image file (relative to this directory) to place at the top
 # of the sidebar.
-#html_logo = None
+# html_logo = None
 
 # The name of an image file (within the static path) to use as favicon of the
 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
 # pixels large.
-#html_favicon = None
+# html_favicon = None
 
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
@@ -127,92 +128,89 @@
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
+# html_last_updated_fmt = '%b %d, %Y'
 
 # If true, SmartyPants will be used to convert quotes and dashes to
 # typographically correct entities.
-#html_use_smartypants = True
+# html_use_smartypants = True
 
 # Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
+# html_sidebars = {}
 
 # Additional templates that should be rendered to pages, maps page names to
 # template names.
-#html_additional_pages = {}
+# html_additional_pages = {}
 
 # If false, no module index is generated.
-#html_domain_indices = True
+# html_domain_indices = True
 
 # If false, no index is generated.
-#html_use_index = True
+# html_use_index = True
 
 # If true, the index is split into individual pages for each letter.
-#html_split_index = False
+# html_split_index = False
 
 # If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
+# html_show_sourcelink = True
 
 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
+# html_show_sphinx = True
 
 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
+# html_show_copyright = True
 
 # If true, an OpenSearch description file will be output, and all pages will
 # contain a <link> tag referring to it.  The value of this option must be the
 # base URL from which the finished HTML is served.
-#html_use_opensearch = ''
+# html_use_opensearch = ''
 
 # This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
+# html_file_suffix = None
 
 # Output file base name for HTML help builder.
-htmlhelp_basename = 'Pollydoc'
+htmlhelp_basename = "Pollydoc"
 
 
 # -- Options for LaTeX output --------------------------------------------------
 
 latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
-
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
-
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
+    # The paper size ('letterpaper' or 'a4paper').
+    #'papersize': 'letterpaper',
+    # The font size ('10pt', '11pt' or '12pt').
+    #'pointsize': '10pt',
+    # Additional stuff for the LaTeX preamble.
+    #'preamble': '',
 }
 
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, documentclass [howto/manual]).
 latex_documents = [
-  ('index', 'Polly.tex', u'Polly Documentation',
-   u'The Polly Team', 'manual'),
+    ("index", "Polly.tex", "Polly Documentation", "The Polly Team", "manual"),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
 # the title page.
-#latex_logo = None
+# latex_logo = None
 
 # For "manual" documents, if this is true, then toplevel headings are parts,
 # not chapters.
-#latex_use_parts = False
+# latex_use_parts = False
 
 # If true, show page references after internal links.
-#latex_show_pagerefs = False
+# latex_show_pagerefs = False
 
 # If true, show URL addresses after external links.
-#latex_show_urls = False
+# latex_show_urls = False
 
 # Documents to append as an appendix to all manuals.
-#latex_appendices = []
+# latex_appendices = []
 
 # If false, no module index is generated.
-#latex_domain_indices = True
+# latex_domain_indices = True
 
 
 # If true, show URL addresses after external links.
-#man_show_urls = False
+# man_show_urls = False
 
 
 # -- Options for Texinfo output ------------------------------------------------
@@ -221,16 +219,22 @@
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-  ('index', 'Polly', u'Polly Documentation',
-   u'The Polly Team', 'Polly', 'One line description of project.',
-   'Miscellaneous'),
+    (
+        "index",
+        "Polly",
+        "Polly Documentation",
+        "The Polly Team",
+        "Polly",
+        "One line description of project.",
+        "Miscellaneous",
+    ),
 ]
 
 # Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
+# texinfo_appendices = []
 
 # If false, no module index is generated.
-#texinfo_domain_indices = True
+# texinfo_domain_indices = True
 
 # How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
+# texinfo_show_urls = 'footnote'
diff --git a/lib/External/isl/imath/tests/gmp-compat-test/genctest.py b/lib/External/isl/imath/tests/gmp-compat-test/genctest.py
index d2771a4..ed0e6c6 100644
--- a/lib/External/isl/imath/tests/gmp-compat-test/genctest.py
+++ b/lib/External/isl/imath/tests/gmp-compat-test/genctest.py
@@ -73,8 +73,12 @@
         code = "\t"
         if ty == mpz_t or ty == mpq_t:
             code += self.api_call_prefix(ty) + "init(" + var + ");\n\t"
-            code += self.api_call_prefix(ty) + "set_str(" + ",".join(
-                [var, param, "10"]) + ")"
+            code += (
+                self.api_call_prefix(ty)
+                + "set_str("
+                + ",".join([var, param, "10"])
+                + ")"
+            )
             if ty == mpq_t:
                 code += ";\n\t"
                 code += self.api_call_prefix(ty) + "canonicalize(" + var + ")"
@@ -101,8 +105,12 @@
         ret = "\t"
         ret_ty = self.api.ret_ty
         if ret_ty != void:
-            ret += self.test_var_type(ret_ty) + " " + self.test_var_name(
-                ret_ty, "_ret") + " = "
+            ret += (
+                self.test_var_type(ret_ty)
+                + " "
+                + self.test_var_name(ret_ty, "_ret")
+                + " = "
+            )
         # call mpq or mpz function
         if self.api.name.startswith("mpz_"):
             prefix = self.api_call_prefix(mpz_t)
@@ -118,34 +126,35 @@
 	  {var} = 1;
 	else if ({var} < 0)
 	  {var} = -1;\n\t
-""".format(var=cmpval)
+""".format(
+            var=cmpval
+        )
         return code
 
     def extract_result(self, ty, pos):
         code = ""
         if ty == mpz_t or ty == mpq_t:
             var = self.test_var_name(ty, pos)
-            code += self.api_call_prefix(
-                ty) + "get_str(out+offset, 10," + var + ");\n"
+            code += self.api_call_prefix(ty) + "get_str(out+offset, 10," + var + ");\n"
             code += "\toffset = offset + strlen(out); "
             code += "out[offset] = ' '; out[offset+1] = 0; offset += 1;"
         else:
             assert pos == -1, "expected a return value, not a param value"
             if ty == ilong:
                 var = self.test_var_name(ty, "_ret")
-                code += 'offset = sprintf(out+offset, " %ld ", ' + var + ');'
+                code += 'offset = sprintf(out+offset, " %ld ", ' + var + ");"
             elif ty == ulong:
                 var = self.test_var_name(ty, "_ret")
-                code += 'offset = sprintf(out+offset, " %lu ", ' + var + ');'
+                code += 'offset = sprintf(out+offset, " %lu ", ' + var + ");"
             elif ty == iint:
                 var = self.test_var_name(ty, "_ret")
-                code += 'offset = sprintf(out+offset, " %d ", ' + var + ');'
+                code += 'offset = sprintf(out+offset, " %d ", ' + var + ");"
             elif ty == size_t:
                 var = self.test_var_name(ty, "_ret")
-                code += 'offset = sprintf(out+offset, " %zu ", ' + var + ');'
+                code += 'offset = sprintf(out+offset, " %zu ", ' + var + ");"
             elif ty == charp:
                 var = self.test_var_name(ty, "_ret")
-                code += 'offset = sprintf(out+offset, " %s ", ' + var + ');'
+                code += 'offset = sprintf(out+offset, " %s ", ' + var + ");"
             else:
                 raise RuntimeError("Unknown param type: " + str(ty))
         return code
@@ -160,9 +169,12 @@
 
         # call canonicalize for mpq_set_ui
         if self.api.name == "mpq_set_ui":
-            code += self.api_call_prefix(
-                mpq_t) + "canonicalize(" + self.test_var_name(mpq_t,
-                                                              0) + ");\n\t"
+            code += (
+                self.api_call_prefix(mpq_t)
+                + "canonicalize("
+                + self.test_var_name(mpq_t, 0)
+                + ");\n\t"
+            )
 
         # get return value
         if ret_ty != void:
@@ -180,8 +192,7 @@
         for (i, p) in enumerate(self.api.params):
             if p == mpz_t or p == mpq_t:
                 var = self.test_var_name(p, i)
-                code += "\t" + self.api_call_prefix(
-                    p) + "clear(" + var + ");\n"
+                code += "\t" + self.api_call_prefix(p) + "clear(" + var + ");\n"
         return code
 
     def print_test_code(self, outf):
@@ -190,8 +201,9 @@
             self.test_param_type(p) + " " + self.test_param_name(p, i)
             for (i, p) in enumerate(api.params)
         ]
-        code = "void {}_{}(char *out, {})".format(self.test_prefix(), api.name,
-                                                  ", ".join(params))
+        code = "void {}_{}(char *out, {})".format(
+            self.test_prefix(), api.name, ", ".join(params)
+        )
         code += "{\n"
         code += self.init_vars_from_params()
         code += self.make_api_call()
diff --git a/lib/External/isl/imath/tests/gmp-compat-test/gendata.py b/lib/External/isl/imath/tests/gmp-compat-test/gendata.py
index c1422dd..3ca17ff 100644
--- a/lib/External/isl/imath/tests/gmp-compat-test/gendata.py
+++ b/lib/External/isl/imath/tests/gmp-compat-test/gendata.py
@@ -42,10 +42,13 @@
 mm_all = mm_slong + mm_ulong + mm_sint + mm_uint + mm_sshort + mm_ushort
 zero_one_all = mzero_one + zero_one
 
-mpz_std_list = zero_one_all + mm_all + apply(plus1, mm_all) + apply(
-    minus1, mm_all)
-si_std_list = zero_one + mm_slong + mm_sint + mm_sshort + mm_slong1 + mm_sint1 + mm_sshort1
-ui_std_list = zero_one + mm_ulong + mm_uint + mm_ushort + mm_ulong1 + mm_uint1 + mm_ushort1
+mpz_std_list = zero_one_all + mm_all + apply(plus1, mm_all) + apply(minus1, mm_all)
+si_std_list = (
+    zero_one + mm_slong + mm_sint + mm_sshort + mm_slong1 + mm_sint1 + mm_sshort1
+)
+ui_std_list = (
+    zero_one + mm_ulong + mm_uint + mm_ushort + mm_ulong1 + mm_uint1 + mm_ushort1
+)
 
 
 def gen_random_mpz(mindigits=1, maxdigits=100, allowneg=True):
@@ -73,8 +76,9 @@
     if length == 1:
         i = random.randint(1, 9)
     else:
-        digits = [random.randint(1, 9)
-                  ] + [random.randint(0, 9) for x in range(length - 1)]
+        digits = [random.randint(1, 9)] + [
+            random.randint(0, 9) for x in range(length - 1)
+        ]
         digits = map(str, digits)
         i = "".join(digits)
     return str(i)
@@ -82,8 +86,7 @@
 
 def gen_mpzs(mindigits=1, maxdigits=100, count=10):
     return [
-        gen_random_mpz(mindigits=mindigits, maxdigits=maxdigits)
-        for x in range(count)
+        gen_random_mpz(mindigits=mindigits, maxdigits=maxdigits) for x in range(count)
     ]
 
 
@@ -123,8 +126,7 @@
 
 
 def gen_mpz_spread(count=default_count):
-    return gen_small_mpzs(count) + gen_medium_mpzs(count) + gen_large_mpzs(
-        count)
+    return gen_small_mpzs(count) + gen_medium_mpzs(count) + gen_large_mpzs(count)
 
 
 def gen_mpz_args(count=default_count):
@@ -257,8 +259,7 @@
     size = ["1", "2", "4", "8"]
     endian = ["0"]
     nails = ["0"]
-    ops = gen_mpz_args(1000) + gen_mpzs(
-        count=100, mindigits=100, maxdigits=1000)
+    ops = gen_mpz_args(1000) + gen_mpzs(count=100, mindigits=100, maxdigits=1000)
 
     args = []
     for r in rop:
@@ -274,8 +275,7 @@
 
 def mpz_sizeinbase_data(api):
     bases = list(map(str, range(2, 37)))
-    ops = gen_mpz_args(1000) + gen_mpzs(
-        count=1000, mindigits=100, maxdigits=2000)
+    ops = gen_mpz_args(1000) + gen_mpzs(count=1000, mindigits=100, maxdigits=2000)
     return [(op, b) for op in ops for b in bases]
 
 
@@ -381,7 +381,7 @@
 }
 
 if __name__ == "__main__":
-    #apis = [gmpapi.get_api("mpq_set_str"),]
+    # apis = [gmpapi.get_api("mpq_set_str"),]
     apis = gmpapi.apis
     for api in apis:
         tests = gen_args(api)
diff --git a/lib/External/isl/imath/tests/gmp-compat-test/genpytest.py b/lib/External/isl/imath/tests/gmp-compat-test/genpytest.py
index 1f3d787..1b5a38c 100644
--- a/lib/External/isl/imath/tests/gmp-compat-test/genpytest.py
+++ b/lib/External/isl/imath/tests/gmp-compat-test/genpytest.py
@@ -5,7 +5,8 @@
 
 
 def print_header(outf):
-    outf.write("""
+    outf.write(
+        """
 #AUTOGENERATED FILE
 import ctypes
 import os
@@ -14,11 +15,13 @@
 
 verbose = False
 fork    = False
-  """)
+  """
+    )
 
 
 def print_cmp(outf):
-    outf.write("""
+    outf.write(
+        """
 def passt(line, name, a_s, b_s):
     if verbose:
       print("PASS: {}@{} {} == {}".format(line, name, a_s, b_s))
@@ -101,11 +104,13 @@
   #print(iout.raw[:70])
   return cstr_eq(line, name, gout, iout)
 
-""")
+"""
+    )
 
 
 def print_api(name, outf):
-    outf.write("""
+    outf.write(
+        """
 def test_{0}(line, name, gmp_test_so, imath_test_so, *args):
   gout = ctypes.create_string_buffer(1024*4);
   iout = ctypes.create_string_buffer(1024*4);
@@ -113,14 +118,19 @@
   imath_test_so.test_{0}(iout, *args)
   eq = cstr_eq(line, name, gout, iout)
   return eq
-""".format(name))
+""".format(
+            name
+        )
+    )
 
 
 def print_api_map(outf):
-    outf.write("""
+    outf.write(
+        """
 def get_wrapper(name):
   test_wrappers = {
-""")
+"""
+    )
     for api in gmpapi.apis:
         outf.write('    "{}" : {},\n'.format(api.name, "test_" + api.name))
     outf.write("  }\n")
diff --git a/lib/External/isl/imath/tests/gmp-compat-test/gmpapi.py b/lib/External/isl/imath/tests/gmp-compat-test/gmpapi.py
index 53b54d3..d3eeeba 100644
--- a/lib/External/isl/imath/tests/gmp-compat-test/gmpapi.py
+++ b/lib/External/isl/imath/tests/gmp-compat-test/gmpapi.py
@@ -13,10 +13,10 @@
 
 class GMPAPI:
     def __init__(self, ret_ty, name, *params, **kw):
-        out = kw.get('out', [0])
-        inout = kw.get('inout', [])
-        mixed = kw.get('mixed', False)
-        custom = kw.get('custom', False)
+        out = kw.get("out", [0])
+        inout = kw.get("inout", [])
+        mixed = kw.get("mixed", False)
+        custom = kw.get("custom", False)
         self.name = name
         self.ret_ty = ret_ty
         self.params = params
@@ -27,7 +27,7 @@
         if self.ret_ty != void and not mixed:
             self.out_params = []
         else:
-            self.out_params = out  #param location of the output result
+            self.out_params = out  # param location of the output result
 
     def is_write_only(self, pos):
         if pos in self.out_params and pos not in self.inout_params:
@@ -35,8 +35,9 @@
         return False
 
     def __str__(self):
-        return ("{} {}({})".format(self.ret_ty, self.name, ",".join(
-            map(str, self.params))))
+        return "{} {}({})".format(
+            self.ret_ty, self.name, ",".join(map(str, self.params))
+        )
 
     def __repr__(self):
         return str(self)
@@ -96,7 +97,8 @@
         iint,
         size_t,
         mpz_t,
-        custom=True),
+        custom=True,
+    ),
     # The mpz_import signature is a bit of a lie, but it is ok because it is custom
     GMPAPI(
         void,
@@ -108,10 +110,10 @@
         iint,
         size_t,
         mpz_t,
-        custom=True),
+        custom=True,
+    ),
     GMPAPI(size_t, "mpz_sizeinbase", mpz_t, iint),
     GMPAPI(charp, "mpz_get_str", charp, iint, mpz_t),
-
     # mpq functions
     GMPAPI(iint, "mpq_set_str", mpq_t, charp, iint, out=[0], mixed=True),
     GMPAPI(void, "mpq_canonicalize", mpq_t, inout=[0]),
diff --git a/lib/External/isl/imath/tests/gmp-compat-test/runtest.py b/lib/External/isl/imath/tests/gmp-compat-test/runtest.py
index 35ac598..3677acb 100644
--- a/lib/External/isl/imath/tests/gmp-compat-test/runtest.py
+++ b/lib/External/isl/imath/tests/gmp-compat-test/runtest.py
@@ -36,15 +36,17 @@
         if options.skip > 0 and line < options.skip:
             continue
         name, args = test.split("|")
-        if options.verbose or (options.progress > 0
-                               and line % options.progress == 0):
+        if options.verbose or (options.progress > 0 and line % options.progress == 0):
             print("TEST: {}@{}".format(line, test), end="")
         api = gmpapi.get_api(name)
         wrapper = wrappers.get_wrapper(name)
         input_args = args.split(",")
         if len(api.params) != len(input_args):
-            raise RuntimeError("Mismatch in args length: {} != {}".format(
-                len(api.params), len(input_args)))
+            raise RuntimeError(
+                "Mismatch in args length: {} != {}".format(
+                    len(api.params), len(input_args)
+                )
+            )
 
         call_args = []
         for i in range(len(api.params)):
@@ -72,8 +74,9 @@
             else:
                 raise RuntimeError("Unknown param type: {}".format(param))
 
-        res = wrappers.run_test(wrapper, line, name, gmp_test_so,
-                                imath_test_so, *call_args)
+        res = wrappers.run_test(
+            wrapper, line, name, gmp_test_so, imath_test_so, *call_args
+        )
         if not res:
             failures += 1
             print_failure(line, test)
@@ -90,27 +93,26 @@
         "--fork",
         help="fork() before each operation",
         action="store_true",
-        default=False)
+        default=False,
+    )
     parser.add_option(
         "-v",
         "--verbose",
         help="print PASS and FAIL tests",
         action="store_true",
-        default=False)
+        default=False,
+    )
     parser.add_option(
         "-p",
         "--progress",
         help="print progress every N tests ",
         metavar="N",
         type="int",
-        default=0)
+        default=0,
+    )
     parser.add_option(
-        "-s",
-        "--skip",
-        help="skip to test N",
-        metavar="N",
-        type="int",
-        default=0)
+        "-s", "--skip", help="skip to test N", metavar="N", type="int", default=0
+    )
     return parser.parse_args()
 
 
@@ -128,16 +130,22 @@
     for test_file in tests:
         print("Running tests in {}".format(test_file))
         (passes, failures, fail_lines) = run_tests(test_file, options)
-        print("  Tests: {}. Passes: {}. Failures: {}.".format(
-            passes + failures, passes, failures))
+        print(
+            "  Tests: {}. Passes: {}. Failures: {}.".format(
+                passes + failures, passes, failures
+            )
+        )
         total_pass += passes
         total_fail += failures
         all_fail_lines += fail_lines
 
     print("=" * 70)
     print("Total")
-    print("  Tests: {}. Passes: {}. Failures: {}.".format(
-        total_pass + total_fail, total_pass, total_fail))
+    print(
+        "  Tests: {}. Passes: {}. Failures: {}.".format(
+            total_pass + total_fail, total_pass, total_fail
+        )
+    )
     if len(all_fail_lines) > 0:
         print("Failing Tests:")
         for (line, test) in all_fail_lines:
diff --git a/lib/External/isl/imath/tools/mkdoc.py b/lib/External/isl/imath/tools/mkdoc.py
index 4744781..34432dd 100644
--- a/lib/External/isl/imath/tools/mkdoc.py
+++ b/lib/External/isl/imath/tools/mkdoc.py
@@ -14,13 +14,15 @@
 # A regular expression to match commented declarations.
 # This is specific to C and not very general; it should work fine for the imath
 # headers but will not adapt well to arbitrary code or to C++.
-doc = re.compile(r'''(?mx)/\*\* # open  /**
+doc = re.compile(
+    r"""(?mx)/\*\* # open  /**
 (?P<text>(?:[^*]|\*[^/])*)      # text      Does a thing
 \*/\n                           # close */
-(?P<decl>[^;{]*(?:;$|\{))''')  # decl  void f(x);
+(?P<decl>[^;{]*(?:;$|\{))"""
+)  # decl  void f(x);
 
 # A regular expression matching up to 4 spaces at the head of a line.
-spc = re.compile(r'(?m)^ {1,4}')
+spc = re.compile(r"(?m)^ {1,4}")
 
 # A regular expression matching an insertion point.  An insertion point has the
 # form {{include "header" name ...}}.  If no names are given, all the names in
@@ -28,7 +30,7 @@
 ins = re.compile(r'{{insert "(?P<file>[^"]*)"(?P<names>(?:\s+\w+)+)?\s*}}')
 
 # A regular expression matching non-identifier characters, for splitting.
-nid = re.compile(r'\W+')
+nid = re.compile(r"\W+")
 
 # A cache of already-parsed files, maps filename to declarations.
 CACHE = {}
@@ -43,17 +45,19 @@
     """Renders text with verbatim sections into markdown."""
     lines = []
     fence = False
-    for line in text.split('\n'):
-        if fence != line.startswith(' '):
-            lines.append('```')
+    for line in text.split("\n"):
+        if fence != line.startswith(" "):
+            lines.append("```")
             fence = not fence
         lines.append(line)
     if fence:
-        lines.append('```')
+        lines.append("```")
     for i, line in enumerate(lines):
-        if i == 0: lines[i] = ' -  ' + line
-        elif line: lines[i] = '    ' + line
-    return '\n'.join(lines)
+        if i == 0:
+            lines[i] = " -  " + line
+        elif line:
+            lines[i] = "    " + line
+    return "\n".join(lines)
 
 
 class LIndex(object):
@@ -69,7 +73,7 @@
         # Scan forward for newlines or EOF, and push the offsets of the line
         # breaks onto the list so we can binary search them later.
         while pos < len(text):
-            next = text.find('\n', pos)
+            next = text.find("\n", pos)
             if next < 0:
                 break
             idx.append(next)
@@ -115,13 +119,13 @@
           decl: the raw text of the declaration
           line: the line number of the declaration
         """
-        lp = decl.find('(')
+        lp = decl.find("(")
         if lp < 0:
-            self.name = last_word(decl.rstrip(';'))
+            self.name = last_word(decl.rstrip(";"))
         else:
             self.name = last_word(decl[:lp])
-        self.decl = ' '.join(decl.rstrip(';{').strip().split())
-        self.comment = spc.sub('', com.rstrip())
+        self.decl = " ".join(decl.rstrip(";{").strip().split())
+        self.comment = spc.sub("", com.rstrip())
         self.line = line
 
     def __repr__(self):
@@ -134,14 +138,16 @@
             path,
             self.line,
             self.name,
-            self.decl[pos + len(self.name):],
+            self.decl[pos + len(self.name) :],
         )
-        return '''------------
+        return """------------
 <a id="{name}"></a><pre>
 {decl};
 </pre>
 {comment}
-'''.format(name=self.name, decl=decl, comment=typeset(self.comment))
+""".format(
+            name=self.name, decl=decl, comment=typeset(self.comment)
+        )
 
 
 def parse_decls(text):
@@ -149,8 +155,8 @@
     decls = collections.OrderedDict()
     idx = LIndex(text)
     for m in doc.finditer(text):
-        line, _ = idx.linecol(m.span('decl')[0])
-        d = Decl(m.group('text'), m.group('decl'), line)
+        line, _ = idx.linecol(m.span("decl")[0])
+        d = Decl(m.group("text"), m.group("decl"), line)
         decls[d.name] = d
     return decls
 
@@ -158,7 +164,7 @@
 def load_file(path):
     """Load declarations from path, or use cached results."""
     if path not in CACHE:
-        with file(path, 'rU') as fp:
+        with file(path, "rU") as fp:
             CACHE[path] = parse_decls(fp.read())
     return CACHE[path]
 
@@ -171,35 +177,38 @@
     doc_template = args[0]
     doc_markdown = args[1]
 
-    with file(doc_template, 'rU') as input:
+    with file(doc_template, "rU") as input:
         template = input.read()
 
-    with file(doc_markdown, 'wt') as output:
+    with file(doc_markdown, "wt") as output:
         print(
-            '''<!--
+            """<!--
   This file was generated from "{0}" by mkdoc.py
   DO NOT EDIT
 -->
-'''.format(doc_template),
-            file=output)
+""".format(
+                doc_template
+            ),
+            file=output,
+        )
 
         pos = 0  # last position of input copied
 
         # Look for substitution markers in the template, and replace them with
         # their content.
         for ip in ins.finditer(template):
-            output.write(template[pos:ip.start()])
+            output.write(template[pos : ip.start()])
             pos = ip.end()
 
-            decls = load_file(ip.group('file'))
-            if ip.group('names'):  # pick the selected names, in order
+            decls = load_file(ip.group("file"))
+            if ip.group("names"):  # pick the selected names, in order
                 decls = collections.OrderedDict(
-                    (key, decls[key])
-                    for key in ip.group('names').strip().split())
+                    (key, decls[key]) for key in ip.group("names").strip().split()
+                )
 
             # Render the selected declarations.
             for decl in decls.values():
-                print(decl.markdown(ip.group('file')), file=output)
+                print(decl.markdown(ip.group("file")), file=output)
 
         # Clean up any remaining template bits
         output.write(template[pos:])
diff --git a/lib/External/isl/isl_test_python.py b/lib/External/isl/isl_test_python.py
index 3894ad1..05bb0c8 100755
--- a/lib/External/isl/isl_test_python.py
+++ b/lib/External/isl/isl_test_python.py
@@ -21,39 +21,42 @@
 #  multiple overloaded constructors and overload resolution is tested.
 #
 def test_constructors():
-	zero1 = isl.val("0")
-	assert(zero1.is_zero())
+    zero1 = isl.val("0")
+    assert zero1.is_zero()
 
-	zero2 = isl.val(0)
-	assert(zero2.is_zero())
+    zero2 = isl.val(0)
+    assert zero2.is_zero()
 
-	zero3 = isl.val.zero()
-	assert(zero3.is_zero())
+    zero3 = isl.val.zero()
+    assert zero3.is_zero()
 
-	bs = isl.basic_set("{ [1] }")
-	result = isl.set("{ [1] }")
-	s = isl.set(bs)
-	assert(s.is_equal(result))
+    bs = isl.basic_set("{ [1] }")
+    result = isl.set("{ [1] }")
+    s = isl.set(bs)
+    assert s.is_equal(result)
 
-	us = isl.union_set("{ A[1]; B[2, 3] }")
-	empty = isl.union_set.empty()
-	assert(us.is_equal(us.union(empty)))
+    us = isl.union_set("{ A[1]; B[2, 3] }")
+    empty = isl.union_set.empty()
+    assert us.is_equal(us.union(empty))
+
 
 # Test integer function parameters for a particular integer value.
 #
 def test_int(i):
-	val_int = isl.val(i)
-	val_str = isl.val(str(i))
-	assert(val_int.eq(val_str))
+    val_int = isl.val(i)
+    val_str = isl.val(str(i))
+    assert val_int.eq(val_str)
+
 
 # Test integer function parameters.
 #
 # Verify that extreme values and zero work.
 #
 def test_parameters_int():
-	test_int(sys.maxsize)
-	test_int(-sys.maxsize - 1)
-	test_int(0)
+    test_int(sys.maxsize)
+    test_int(-sys.maxsize - 1)
+    test_int(0)
+
 
 # Test isl objects parameters.
 #
@@ -64,33 +67,35 @@
 # the method is called.
 #
 def test_parameters_obj():
-	a = isl.set("{ [0] }")
-	b = isl.set("{ [1] }")
-	c = isl.set("{ [2] }")
-	expected = isl.set("{ [i] : 0 <= i <= 2 }")
+    a = isl.set("{ [0] }")
+    b = isl.set("{ [1] }")
+    c = isl.set("{ [2] }")
+    expected = isl.set("{ [i] : 0 <= i <= 2 }")
 
-	tmp = a.union(b)
-	res_lvalue_param = tmp.union(c)
-	assert(res_lvalue_param.is_equal(expected))
+    tmp = a.union(b)
+    res_lvalue_param = tmp.union(c)
+    assert res_lvalue_param.is_equal(expected)
 
-	res_rvalue_param = a.union(b).union(c)
-	assert(res_rvalue_param.is_equal(expected))
+    res_rvalue_param = a.union(b).union(c)
+    assert res_rvalue_param.is_equal(expected)
 
-	a2 = isl.basic_set("{ [0] }")
-	assert(a.is_equal(a2))
+    a2 = isl.basic_set("{ [0] }")
+    assert a.is_equal(a2)
 
-	two = isl.val(2)
-	half = isl.val("1/2")
-	res_only_this_param = two.inv()
-	assert(res_only_this_param.eq(half))
+    two = isl.val(2)
+    half = isl.val("1/2")
+    res_only_this_param = two.inv()
+    assert res_only_this_param.eq(half)
+
 
 # Test different kinds of parameters to be passed to functions.
 #
 # This includes integer and isl object parameters.
 #
 def test_parameters():
-	test_parameters_int()
-	test_parameters_obj()
+    test_parameters_int()
+    test_parameters_obj()
+
 
 # Test that isl objects are returned correctly.
 #
@@ -98,55 +103,59 @@
 # returned.
 #
 def test_return_obj():
-	one = isl.val("1")
-	two = isl.val("2")
-	three = isl.val("3")
+    one = isl.val("1")
+    two = isl.val("2")
+    three = isl.val("3")
 
-	res = one.add(two)
+    res = one.add(two)
 
-	assert(res.eq(three))
+    assert res.eq(three)
+
 
 # Test that integer values are returned correctly.
 #
 def test_return_int():
-	one = isl.val("1")
-	neg_one = isl.val("-1")
-	zero = isl.val("0")
+    one = isl.val("1")
+    neg_one = isl.val("-1")
+    zero = isl.val("0")
 
-	assert(one.sgn() > 0)
-	assert(neg_one.sgn() < 0)
-	assert(zero.sgn() == 0)
+    assert one.sgn() > 0
+    assert neg_one.sgn() < 0
+    assert zero.sgn() == 0
+
 
 # Test that isl_bool values are returned correctly.
 #
 # In particular, check the conversion to bool in case of true and false.
 #
 def test_return_bool():
-	empty = isl.set("{ : false }")
-	univ = isl.set("{ : }")
+    empty = isl.set("{ : false }")
+    univ = isl.set("{ : }")
 
-	b_true = empty.is_empty()
-	b_false = univ.is_empty()
+    b_true = empty.is_empty()
+    b_false = univ.is_empty()
 
-	assert(b_true)
-	assert(not b_false)
+    assert b_true
+    assert not b_false
+
 
 # Test that strings are returned correctly.
 # Do so by calling overloaded isl.ast_build.from_expr methods.
 #
 def test_return_string():
-	context = isl.set("[n] -> { : }")
-	build = isl.ast_build.from_context(context)
-	pw_aff = isl.pw_aff("[n] -> { [n] }")
-	set = isl.set("[n] -> { : n >= 0 }")
+    context = isl.set("[n] -> { : }")
+    build = isl.ast_build.from_context(context)
+    pw_aff = isl.pw_aff("[n] -> { [n] }")
+    set = isl.set("[n] -> { : n >= 0 }")
 
-	expr = build.expr_from(pw_aff)
-	expected_string = "n"
-	assert(expected_string == expr.to_C_str())
+    expr = build.expr_from(pw_aff)
+    expected_string = "n"
+    assert expected_string == expr.to_C_str()
 
-	expr = build.expr_from(set)
-	expected_string = "n >= 0"
-	assert(expected_string == expr.to_C_str())
+    expr = build.expr_from(set)
+    expected_string = "n >= 0"
+    assert expected_string == expr.to_C_str()
+
 
 # Test that return values are handled correctly.
 #
@@ -154,16 +163,18 @@
 # returned correctly.
 #
 def test_return():
-	test_return_obj()
-	test_return_int()
-	test_return_bool()
-	test_return_string()
+    test_return_obj()
+    test_return_int()
+    test_return_bool()
+    test_return_string()
+
 
 # A class that is used to test isl.id.user.
 #
 class S:
-	def __init__(self):
-		self.value = 42
+    def __init__(self):
+        self.value = 42
+
 
 # Test isl.id.user.
 #
@@ -171,14 +182,15 @@
 # can be retrieved again.
 #
 def test_user():
-	id = isl.id("test", 5)
-	id2 = isl.id("test2")
-	id3 = isl.id("S", S())
-	assert id.user() == 5, f"unexpected user object {id.user()}"
-	assert id2.user() is None, f"unexpected user object {id2.user()}"
-	s = id3.user()
-	assert isinstance(s, S), f"unexpected user object {s}"
-	assert s.value == 42, f"unexpected user object {s}"
+    id = isl.id("test", 5)
+    id2 = isl.id("test2")
+    id3 = isl.id("S", S())
+    assert id.user() == 5, f"unexpected user object {id.user()}"
+    assert id2.user() is None, f"unexpected user object {id2.user()}"
+    s = id3.user()
+    assert isinstance(s, S), f"unexpected user object {s}"
+    assert s.value == 42, f"unexpected user object {s}"
+
 
 # Test that foreach functions are modeled correctly.
 #
@@ -188,30 +200,33 @@
 # the closure and that it propagates the exception.
 #
 def test_foreach():
-	s = isl.set("{ [0]; [1]; [2] }")
+    s = isl.set("{ [0]; [1]; [2] }")
 
-	list = []
-	def add(bs):
-		list.append(bs)
-	s.foreach_basic_set(add)
+    list = []
 
-	assert(len(list) == 3)
-	assert(list[0].is_subset(s))
-	assert(list[1].is_subset(s))
-	assert(list[2].is_subset(s))
-	assert(not list[0].is_equal(list[1]))
-	assert(not list[0].is_equal(list[2]))
-	assert(not list[1].is_equal(list[2]))
+    def add(bs):
+        list.append(bs)
 
-	def fail(bs):
-		raise Exception("fail")
+    s.foreach_basic_set(add)
 
-	caught = False
-	try:
-		s.foreach_basic_set(fail)
-	except:
-		caught = True
-	assert(caught)
+    assert len(list) == 3
+    assert list[0].is_subset(s)
+    assert list[1].is_subset(s)
+    assert list[2].is_subset(s)
+    assert not list[0].is_equal(list[1])
+    assert not list[0].is_equal(list[2])
+    assert not list[1].is_equal(list[2])
+
+    def fail(bs):
+        raise Exception("fail")
+
+    caught = False
+    try:
+        s.foreach_basic_set(fail)
+    except:
+        caught = True
+    assert caught
+
 
 # Test the functionality of "foreach_scc" functions.
 #
@@ -219,29 +234,31 @@
 # but where two of the elements ("a" and "b") are incomparable.
 #
 def test_foreach_scc():
-	list = isl.id_list(3)
-	sorted = [isl.id_list(3)]
-	data = {
-		'a' : isl.map("{ [0] -> [1] }"),
-		'b' : isl.map("{ [1] -> [0] }"),
-		'c' : isl.map("{ [i = 0:1] -> [i] }"),
-	}
-	for k, v in data.items():
-		list = list.add(k)
-	id = data['a'].space().domain().identity_multi_pw_aff_on_domain()
-	def follows(a, b):
-		map = data[b.name()].apply_domain(data[a.name()])
-		return not map.lex_ge_at(id).is_empty()
+    list = isl.id_list(3)
+    sorted = [isl.id_list(3)]
+    data = {
+        "a": isl.map("{ [0] -> [1] }"),
+        "b": isl.map("{ [1] -> [0] }"),
+        "c": isl.map("{ [i = 0:1] -> [i] }"),
+    }
+    for k, v in data.items():
+        list = list.add(k)
+    id = data["a"].space().domain().identity_multi_pw_aff_on_domain()
 
-	def add_single(scc):
-		assert(scc.size() == 1)
-		sorted[0] = sorted[0].concat(scc)
+    def follows(a, b):
+        map = data[b.name()].apply_domain(data[a.name()])
+        return not map.lex_ge_at(id).is_empty()
 
-	list.foreach_scc(follows, add_single)
-	assert(sorted[0].size() == 3)
-	assert(sorted[0].at(0).name() == "b")
-	assert(sorted[0].at(1).name() == "c")
-	assert(sorted[0].at(2).name() == "a")
+    def add_single(scc):
+        assert scc.size() == 1
+        sorted[0] = sorted[0].concat(scc)
+
+    list.foreach_scc(follows, add_single)
+    assert sorted[0].size() == 3
+    assert sorted[0].at(0).name() == "b"
+    assert sorted[0].at(1).name() == "c"
+    assert sorted[0].at(2).name() == "a"
+
 
 # Test the functionality of "every" functions.
 #
@@ -249,74 +266,81 @@
 # test that exceptions are properly propagated.
 #
 def test_every():
-	us = isl.union_set("{ A[i]; B[j] }")
+    us = isl.union_set("{ A[i]; B[j] }")
 
-	def is_empty(s):
-		return s.is_empty()
-	assert(not us.every_set(is_empty))
+    def is_empty(s):
+        return s.is_empty()
 
-	def is_non_empty(s):
-		return not s.is_empty()
-	assert(us.every_set(is_non_empty))
+    assert not us.every_set(is_empty)
 
-	def in_A(s):
-		return s.is_subset(isl.set("{ A[x] }"))
-	assert(not us.every_set(in_A))
+    def is_non_empty(s):
+        return not s.is_empty()
 
-	def not_in_A(s):
-		return not s.is_subset(isl.set("{ A[x] }"))
-	assert(not us.every_set(not_in_A))
+    assert us.every_set(is_non_empty)
 
-	def fail(s):
-		raise Exception("fail")
+    def in_A(s):
+        return s.is_subset(isl.set("{ A[x] }"))
 
-	caught = False
-	try:
-		us.ever_set(fail)
-	except:
-		caught = True
-	assert(caught)
+    assert not us.every_set(in_A)
+
+    def not_in_A(s):
+        return not s.is_subset(isl.set("{ A[x] }"))
+
+    assert not us.every_set(not_in_A)
+
+    def fail(s):
+        raise Exception("fail")
+
+    caught = False
+    try:
+        us.ever_set(fail)
+    except:
+        caught = True
+    assert caught
+
 
 # Check basic construction of spaces.
 #
 def test_space():
-	unit = isl.space.unit()
-	set_space = unit.add_named_tuple("A", 3)
-	map_space = set_space.add_named_tuple("B", 2)
+    unit = isl.space.unit()
+    set_space = unit.add_named_tuple("A", 3)
+    map_space = set_space.add_named_tuple("B", 2)
 
-	set = isl.set.universe(set_space)
-	map = isl.map.universe(map_space)
-	assert(set.is_equal(isl.set("{ A[*,*,*] }")))
-	assert(map.is_equal(isl.map("{ A[*,*,*] -> B[*,*] }")))
+    set = isl.set.universe(set_space)
+    map = isl.map.universe(map_space)
+    assert set.is_equal(isl.set("{ A[*,*,*] }"))
+    assert map.is_equal(isl.map("{ A[*,*,*] -> B[*,*] }"))
+
 
 # Construct a simple schedule tree with an outer sequence node and
 # a single-dimensional band node in each branch, with one of them
 # marked coincident.
 #
 def construct_schedule_tree():
-	A = isl.union_set("{ A[i] : 0 <= i < 10 }")
-	B = isl.union_set("{ B[i] : 0 <= i < 20 }")
+    A = isl.union_set("{ A[i] : 0 <= i < 10 }")
+    B = isl.union_set("{ B[i] : 0 <= i < 20 }")
 
-	node = isl.schedule_node.from_domain(A.union(B))
-	node = node.child(0)
+    node = isl.schedule_node.from_domain(A.union(B))
+    node = node.child(0)
 
-	filters = isl.union_set_list(A).add(B)
-	node = node.insert_sequence(filters)
+    filters = isl.union_set_list(A).add(B)
+    node = node.insert_sequence(filters)
 
-	f_A = isl.multi_union_pw_aff("[ { A[i] -> [i] } ]")
-	node = node.child(0)
-	node = node.child(0)
-	node = node.insert_partial_schedule(f_A)
-	node = node.member_set_coincident(0, True)
-	node = node.ancestor(2)
+    f_A = isl.multi_union_pw_aff("[ { A[i] -> [i] } ]")
+    node = node.child(0)
+    node = node.child(0)
+    node = node.insert_partial_schedule(f_A)
+    node = node.member_set_coincident(0, True)
+    node = node.ancestor(2)
 
-	f_B = isl.multi_union_pw_aff("[ { B[i] -> [i] } ]")
-	node = node.child(1)
-	node = node.child(0)
-	node = node.insert_partial_schedule(f_B)
-	node = node.ancestor(2)
+    f_B = isl.multi_union_pw_aff("[ { B[i] -> [i] } ]")
+    node = node.child(1)
+    node = node.child(0)
+    node = node.insert_partial_schedule(f_B)
+    node = node.ancestor(2)
 
-	return node.schedule()
+    return node.schedule()
+
 
 # Test basic schedule tree functionality.
 #
@@ -327,64 +351,76 @@
 # - test every_descendant
 #
 def test_schedule_tree():
-	schedule = construct_schedule_tree()
-	root = schedule.root()
+    schedule = construct_schedule_tree()
+    root = schedule.root()
 
-	assert(type(root) == isl.schedule_node_domain)
+    assert type(root) == isl.schedule_node_domain
 
-	count = [0]
-	def inc_count(node):
-		count[0] += 1
-		return node
-	root = root.map_descendant_bottom_up(inc_count)
-	assert(count[0] == 8)
+    count = [0]
 
-	def fail_map(node):
-		raise Exception("fail")
-		return node
-	caught = False
-	try:
-		root.map_descendant_bottom_up(fail_map)
-	except:
-		caught = True
-	assert(caught)
+    def inc_count(node):
+        count[0] += 1
+        return node
 
-	count = [0]
-	def inc_count(node):
-		count[0] += 1
-		return True
-	root.foreach_descendant_top_down(inc_count)
-	assert(count[0] == 8)
+    root = root.map_descendant_bottom_up(inc_count)
+    assert count[0] == 8
 
-	count = [0]
-	def inc_count(node):
-		count[0] += 1
-		return False
-	root.foreach_descendant_top_down(inc_count)
-	assert(count[0] == 1)
+    def fail_map(node):
+        raise Exception("fail")
+        return node
 
-	def is_not_domain(node):
-		return type(node) != isl.schedule_node_domain
-	assert(root.child(0).every_descendant(is_not_domain))
-	assert(not root.every_descendant(is_not_domain))
+    caught = False
+    try:
+        root.map_descendant_bottom_up(fail_map)
+    except:
+        caught = True
+    assert caught
 
-	def fail(node):
-		raise Exception("fail")
-	caught = False
-	try:
-		root.every_descendant(fail)
-	except:
-		caught = True
-	assert(caught)
+    count = [0]
 
-	domain = root.domain()
-	filters = [isl.union_set("{}")]
-	def collect_filters(node):
-		if type(node) == isl.schedule_node_filter:
-			filters[0] = filters[0].union(node.filter())
-		return True
-	root.every_descendant(collect_filters)
-	assert(domain.is_equal(filters[0]))
+    def inc_count(node):
+        count[0] += 1
+        return True
+
+    root.foreach_descendant_top_down(inc_count)
+    assert count[0] == 8
+
+    count = [0]
+
+    def inc_count(node):
+        count[0] += 1
+        return False
+
+    root.foreach_descendant_top_down(inc_count)
+    assert count[0] == 1
+
+    def is_not_domain(node):
+        return type(node) != isl.schedule_node_domain
+
+    assert root.child(0).every_descendant(is_not_domain)
+    assert not root.every_descendant(is_not_domain)
+
+    def fail(node):
+        raise Exception("fail")
+
+    caught = False
+    try:
+        root.every_descendant(fail)
+    except:
+        caught = True
+    assert caught
+
+    domain = root.domain()
+    filters = [isl.union_set("{}")]
+
+    def collect_filters(node):
+        if type(node) == isl.schedule_node_filter:
+            filters[0] = filters[0].union(node.filter())
+        return True
+
+    root.every_descendant(collect_filters)
+    assert domain.is_equal(filters[0])
+
 
 # Test marking band members for unrolling.
 # "schedule" is the schedule created by construct_schedule_tree.
@@ -393,23 +429,27 @@
 # by the AST generator.
 #
 def test_ast_build_unroll(schedule):
-	root = schedule.root()
-	def mark_unroll(node):
-		if type(node) == isl.schedule_node_band:
-			node = node.member_set_ast_loop_unroll(0)
-		return node
-	root = root.map_descendant_bottom_up(mark_unroll)
-	schedule = root.schedule()
+    root = schedule.root()
 
-	count_ast = [0]
-	def inc_count_ast(node, build):
-		count_ast[0] += 1
-		return node
+    def mark_unroll(node):
+        if type(node) == isl.schedule_node_band:
+            node = node.member_set_ast_loop_unroll(0)
+        return node
 
-	build = isl.ast_build()
-	build = build.set_at_each_domain(inc_count_ast)
-	ast = build.node_from(schedule)
-	assert(count_ast[0] == 30)
+    root = root.map_descendant_bottom_up(mark_unroll)
+    schedule = root.schedule()
+
+    count_ast = [0]
+
+    def inc_count_ast(node, build):
+        count_ast[0] += 1
+        return node
+
+    build = isl.ast_build()
+    build = build.set_at_each_domain(inc_count_ast)
+    ast = build.node_from(schedule)
+    assert count_ast[0] == 30
+
 
 # Test basic AST generation from a schedule tree.
 #
@@ -419,62 +459,67 @@
 # - test unrolling
 #
 def test_ast_build():
-	schedule = construct_schedule_tree()
+    schedule = construct_schedule_tree()
 
-	count_ast = [0]
-	def inc_count_ast(node, build):
-		count_ast[0] += 1
-		return node
+    count_ast = [0]
 
-	build = isl.ast_build()
-	build_copy = build.set_at_each_domain(inc_count_ast)
-	ast = build.node_from(schedule)
-	assert(count_ast[0] == 0)
-	count_ast[0] = 0
-	ast = build_copy.node_from(schedule)
-	assert(count_ast[0] == 2)
-	build = build_copy
-	count_ast[0] = 0
-	ast = build.node_from(schedule)
-	assert(count_ast[0] == 2)
+    def inc_count_ast(node, build):
+        count_ast[0] += 1
+        return node
 
-	do_fail = True
-	count_ast_fail = [0]
-	def fail_inc_count_ast(node, build):
-		count_ast_fail[0] += 1
-		if do_fail:
-			raise Exception("fail")
-		return node
-	build = isl.ast_build()
-	build = build.set_at_each_domain(fail_inc_count_ast)
-	caught = False
-	try:
-		ast = build.node_from(schedule)
-	except:
-		caught = True
-	assert(caught)
-	assert(count_ast_fail[0] > 0)
-	build_copy = build
-	build_copy = build_copy.set_at_each_domain(inc_count_ast)
-	count_ast[0] = 0
-	ast = build_copy.node_from(schedule)
-	assert(count_ast[0] == 2)
-	count_ast_fail[0] = 0
-	do_fail = False
-	ast = build.node_from(schedule)
-	assert(count_ast_fail[0] == 2)
+    build = isl.ast_build()
+    build_copy = build.set_at_each_domain(inc_count_ast)
+    ast = build.node_from(schedule)
+    assert count_ast[0] == 0
+    count_ast[0] = 0
+    ast = build_copy.node_from(schedule)
+    assert count_ast[0] == 2
+    build = build_copy
+    count_ast[0] = 0
+    ast = build.node_from(schedule)
+    assert count_ast[0] == 2
 
-	test_ast_build_unroll(schedule)
+    do_fail = True
+    count_ast_fail = [0]
+
+    def fail_inc_count_ast(node, build):
+        count_ast_fail[0] += 1
+        if do_fail:
+            raise Exception("fail")
+        return node
+
+    build = isl.ast_build()
+    build = build.set_at_each_domain(fail_inc_count_ast)
+    caught = False
+    try:
+        ast = build.node_from(schedule)
+    except:
+        caught = True
+    assert caught
+    assert count_ast_fail[0] > 0
+    build_copy = build
+    build_copy = build_copy.set_at_each_domain(inc_count_ast)
+    count_ast[0] = 0
+    ast = build_copy.node_from(schedule)
+    assert count_ast[0] == 2
+    count_ast_fail[0] = 0
+    do_fail = False
+    ast = build.node_from(schedule)
+    assert count_ast_fail[0] == 2
+
+    test_ast_build_unroll(schedule)
+
 
 # Test basic AST expression generation from an affine expression.
 #
 def test_ast_build_expr():
-	pa = isl.pw_aff("[n] -> { [n + 1] }")
-	build = isl.ast_build.from_context(pa.domain())
+    pa = isl.pw_aff("[n] -> { [n + 1] }")
+    build = isl.ast_build.from_context(pa.domain())
 
-	op = build.expr_from(pa)
-	assert(type(op) == isl.ast_expr_op_add)
-	assert(op.n_arg() == 2)
+    op = build.expr_from(pa)
+    assert type(op) == isl.ast_expr_op_add
+    assert op.n_arg() == 2
+
 
 # Test the isl Python interface
 #
diff --git a/lib/External/isl/libisl-gdb.py b/lib/External/isl/libisl-gdb.py
index fd15626..bf01bc5 100644
--- a/lib/External/isl/libisl-gdb.py
+++ b/lib/External/isl/libisl-gdb.py
@@ -3,98 +3,116 @@
 
 # GDB Pretty Printers for most isl objects
 class IslObjectPrinter:
-	"""Print an isl object"""
-	def __init__ (self, val, type):
-		self.val = val
-		self.type = type
+    """Print an isl object"""
 
-	def to_string (self):
-		# Cast val to a void pointer to stop gdb using this pretty
-		# printer for the pointer which would lead to an infinite loop.
-		void_ptr = gdb.lookup_type('void').pointer()
-		value = str(self.val.cast(void_ptr))
-		printer = gdb.parse_and_eval("isl_printer_to_str(isl_"
-					     + str(self.type)
-					     + "_get_ctx(" + value + "))")
-		printer = gdb.parse_and_eval("isl_printer_print_"
-					     + str(self.type) + "("
-					     + str(printer) + ", "
-					     + value + ")")
-		string = gdb.parse_and_eval("(char*)isl_printer_get_str("
-					    + str(printer) + ")")
-		gdb.parse_and_eval("isl_printer_free(" + str(printer) + ")")
-		return string
+    def __init__(self, val, type):
+        self.val = val
+        self.type = type
 
-	def display_hint (self):
-		return 'string'
+    def to_string(self):
+        # Cast val to a void pointer to stop gdb using this pretty
+        # printer for the pointer which would lead to an infinite loop.
+        void_ptr = gdb.lookup_type("void").pointer()
+        value = str(self.val.cast(void_ptr))
+        printer = gdb.parse_and_eval(
+            "isl_printer_to_str(isl_" + str(self.type) + "_get_ctx(" + value + "))"
+        )
+        printer = gdb.parse_and_eval(
+            "isl_printer_print_"
+            + str(self.type)
+            + "("
+            + str(printer)
+            + ", "
+            + value
+            + ")"
+        )
+        string = gdb.parse_and_eval("(char*)isl_printer_get_str(" + str(printer) + ")")
+        gdb.parse_and_eval("isl_printer_free(" + str(printer) + ")")
+        return string
+
+    def display_hint(self):
+        return "string"
+
 
 class IslIntPrinter:
-	"""Print an isl_int """
-	def __init__ (self, val):
-		self.val = val
+    """Print an isl_int"""
 
-	def to_string (self):
-		# Cast val to a void pointer to stop gdb using this pretty
-		# printer for the pointer which would lead to an infinite loop.
-		void_ptr = gdb.lookup_type('void').pointer()
-		value = str(self.val.cast(void_ptr))
+    def __init__(self, val):
+        self.val = val
 
-		context = gdb.parse_and_eval("isl_ctx_alloc()")
-		printer = gdb.parse_and_eval("isl_printer_to_str("
-					     + str(context) + ")")
-		printer = gdb.parse_and_eval("isl_printer_print_isl_int("
-					     + str(printer) + ", "
-					     + value + ")")
-		string = gdb.parse_and_eval("(char*)isl_printer_get_str("
-					    + str(printer) + ")")
-		gdb.parse_and_eval("isl_printer_free(" + str(printer) + ")")
-		gdb.parse_and_eval("isl_ctx_free(" + str(context) + ")")
-		return string
+    def to_string(self):
+        # Cast val to a void pointer to stop gdb using this pretty
+        # printer for the pointer which would lead to an infinite loop.
+        void_ptr = gdb.lookup_type("void").pointer()
+        value = str(self.val.cast(void_ptr))
 
-	def display_hint (self):
-		return 'string'
+        context = gdb.parse_and_eval("isl_ctx_alloc()")
+        printer = gdb.parse_and_eval("isl_printer_to_str(" + str(context) + ")")
+        printer = gdb.parse_and_eval(
+            "isl_printer_print_isl_int(" + str(printer) + ", " + value + ")"
+        )
+        string = gdb.parse_and_eval("(char*)isl_printer_get_str(" + str(printer) + ")")
+        gdb.parse_and_eval("isl_printer_free(" + str(printer) + ")")
+        gdb.parse_and_eval("isl_ctx_free(" + str(context) + ")")
+        return string
 
-class IslPrintCommand (gdb.Command):
-	"""Print an isl value."""
-	def __init__ (self):
-		super (IslPrintCommand, self).__init__ ("islprint",
-							gdb.COMMAND_OBSCURE)
-	def invoke (self, arg, from_tty):
-		arg = gdb.parse_and_eval(arg);
-		printer = str_lookup_function(arg)
+    def display_hint(self):
+        return "string"
 
-		if printer == None:
-			print("No isl printer for this type")
-			return
 
-		print(printer.to_string())
+class IslPrintCommand(gdb.Command):
+    """Print an isl value."""
+
+    def __init__(self):
+        super(IslPrintCommand, self).__init__("islprint", gdb.COMMAND_OBSCURE)
+
+    def invoke(self, arg, from_tty):
+        arg = gdb.parse_and_eval(arg)
+        printer = str_lookup_function(arg)
+
+        if printer == None:
+            print("No isl printer for this type")
+            return
+
+        print(printer.to_string())
+
 
 IslPrintCommand()
 
-def str_lookup_function (val):
-	if val.type.code != gdb.TYPE_CODE_PTR:
-		if str(val.type) == "isl_int":
-			return IslIntPrinter(val)
-		else:
-			return None
 
-	lookup_tag = val.type.target()
-	regex = re.compile ("^isl_(.*)$")
+def str_lookup_function(val):
+    if val.type.code != gdb.TYPE_CODE_PTR:
+        if str(val.type) == "isl_int":
+            return IslIntPrinter(val)
+        else:
+            return None
 
-	if lookup_tag == None:
-		return None
+    lookup_tag = val.type.target()
+    regex = re.compile("^isl_(.*)$")
 
-	m = regex.match (str(lookup_tag))
+    if lookup_tag == None:
+        return None
 
-	if m:
-		# Those types of printers defined in isl.
-		if m.group(1) in ["basic_set", "set", "union_set", "basic_map",
-				  "map", "union_map", "qpolynomial",
-				  "pw_qpolynomial", "pw_qpolynomial_fold",
-				  "union_pw_qpolynomial",
-				  "union_pw_qpolynomial_fold"]:
-			return IslObjectPrinter(val, m.group(1))
-	return None
+    m = regex.match(str(lookup_tag))
+
+    if m:
+        # Those types of printers defined in isl.
+        if m.group(1) in [
+            "basic_set",
+            "set",
+            "union_set",
+            "basic_map",
+            "map",
+            "union_map",
+            "qpolynomial",
+            "pw_qpolynomial",
+            "pw_qpolynomial_fold",
+            "union_pw_qpolynomial",
+            "union_pw_qpolynomial_fold",
+        ]:
+            return IslObjectPrinter(val, m.group(1))
+    return None
+
 
 # Do not register the pretty printer.
 # gdb.current_objfile().pretty_printers.append(str_lookup_function)
diff --git a/test/update_check.py b/test/update_check.py
index 9890843..88d95c2 100644
--- a/test/update_check.py
+++ b/test/update_check.py
@@ -11,19 +11,28 @@
 import re
 
 
-polly_src_dir = '''@POLLY_SOURCE_DIR@'''
-polly_lib_dir = '''@POLLY_LIB_DIR@'''
-shlibext = '''@LLVM_SHLIBEXT@'''
-llvm_tools_dir = '''@LLVM_TOOLS_DIR@'''
-llvm_polly_link_into_tools = not '''@LLVM_POLLY_LINK_INTO_TOOLS@'''.lower() in {'','0','n','no','off','false','notfound','llvm_polly_link_into_tools-notfound'}
+polly_src_dir = """@POLLY_SOURCE_DIR@"""
+polly_lib_dir = """@POLLY_LIB_DIR@"""
+shlibext = """@LLVM_SHLIBEXT@"""
+llvm_tools_dir = """@LLVM_TOOLS_DIR@"""
+llvm_polly_link_into_tools = not """@LLVM_POLLY_LINK_INTO_TOOLS@""".lower() in {
+    "",
+    "0",
+    "n",
+    "no",
+    "off",
+    "false",
+    "notfound",
+    "llvm_polly_link_into_tools-notfound",
+}
 
-runre = re.compile(r'\s*\;\s*RUN\s*\:(?P<tool>.*)')
-filecheckre = re.compile(r'\s*(?P<tool>.*)\|\s*(?P<filecheck>FileCheck\s[^|]*)')
-emptyline = re.compile(r'\s*(\;\s*)?')
-commentline = re.compile(r'\s*(\;.*)?')
+runre = re.compile(r"\s*\;\s*RUN\s*\:(?P<tool>.*)")
+filecheckre = re.compile(r"\s*(?P<tool>.*)\|\s*(?P<filecheck>FileCheck\s[^|]*)")
+emptyline = re.compile(r"\s*(\;\s*)?")
+commentline = re.compile(r"\s*(\;.*)?")
 
 
-def ltrim_emptylines(lines,meta=None):
+def ltrim_emptylines(lines, meta=None):
     while len(lines) and emptyline.fullmatch(lines[0]):
         del lines[0]
         if meta is not None:
@@ -44,14 +53,14 @@
     complpath = os.path.join(path, filename)
     if os.path.isfile(complpath):
         return complpath
-    elif os.path.isfile(complpath + '.exe'):
-        return complpath + '.exe'
+    elif os.path.isfile(complpath + ".exe"):
+        return complpath + ".exe"
     return filename
 
 
 def indention(line):
-    for i,c in enumerate(line):
-        if c != ' ' and c != '\t':
+    for i, c in enumerate(line):
+        if c != " " and c != "\t":
             return i
     return None
 
@@ -59,127 +68,130 @@
 def common_indent(lines):
     indentions = (indention(line) for line in lines)
     indentions = (indent for indent in indentions if indent is not None)
-    return min(indentions,default=0)
+    return min(indentions, default=0)
 
 
-funcre = re.compile(r'^    Function: \S*$')
-regionre = re.compile(r'^    Region: \S*$')
-depthre = re.compile(r'^    Max Loop Depth: .*')
-paramre = re.compile(r'    [0-9a-z-A-Z_]+\: .*')
+funcre = re.compile(r"^    Function: \S*$")
+regionre = re.compile(r"^    Region: \S*$")
+depthre = re.compile(r"^    Max Loop Depth: .*")
+paramre = re.compile(r"    [0-9a-z-A-Z_]+\: .*")
+
 
 def classyfier1(lines):
     i = iter(lines)
     line = i.__next__()
     while True:
-        if line.startswith("Printing analysis 'Polly - Calculate dependences' for region: "):
-            yield {'PrintingDependenceInfo'}
+        if line.startswith(
+            "Printing analysis 'Polly - Calculate dependences' for region: "
+        ):
+            yield {"PrintingDependenceInfo"}
         elif line.startswith("remark: "):
-            yield {'Remark'}
+            yield {"Remark"}
         elif funcre.fullmatch(line):
-            yield {'Function'}
+            yield {"Function"}
         elif regionre.fullmatch(line):
-            yield  { 'Region'}
+            yield {"Region"}
         elif depthre.fullmatch(line):
-            yield  {'MaxLoopDepth'}
-        elif line == '    Invariant Accesses: {':
+            yield {"MaxLoopDepth"}
+        elif line == "    Invariant Accesses: {":
             while True:
-                yield { 'InvariantAccesses'}
-                if line == '    }':
+                yield {"InvariantAccesses"}
+                if line == "    }":
                     break
                 line = i.__next__()
-        elif line == '    Context:':
-            yield  {'Context'}
+        elif line == "    Context:":
+            yield {"Context"}
             line = i.__next__()
-            yield  {'Context'}
-        elif line == '    Assumed Context:':
-            yield  {'AssumedContext'}
+            yield {"Context"}
+        elif line == "    Assumed Context:":
+            yield {"AssumedContext"}
             line = i.__next__()
-            yield  {'AssumedContext'}
-        elif line == '    Invalid Context:':
-            yield  {'InvalidContext'}
+            yield {"AssumedContext"}
+        elif line == "    Invalid Context:":
+            yield {"InvalidContext"}
             line = i.__next__()
-            yield  {'InvalidContext'}
-        elif line == '    Boundary Context:':
-            yield  {'BoundaryContext'}
+            yield {"InvalidContext"}
+        elif line == "    Boundary Context:":
+            yield {"BoundaryContext"}
             line = i.__next__()
-            yield  {'BoundaryContext'}
+            yield {"BoundaryContext"}
             line = i.__next__()
             while paramre.fullmatch(line):
-                yield  {'Param'}
+                yield {"Param"}
                 line = i.__next__()
             continue
-        elif line == '    Arrays {':
+        elif line == "    Arrays {":
             while True:
-                yield  {'Arrays'}
-                if line == '    }':
+                yield {"Arrays"}
+                if line == "    }":
                     break
                 line = i.__next__()
-        elif line == '    Arrays (Bounds as pw_affs) {':
+        elif line == "    Arrays (Bounds as pw_affs) {":
             while True:
-                yield  {'PwAffArrays'}
-                if line == '    }':
+                yield {"PwAffArrays"}
+                if line == "    }":
                     break
                 line = i.__next__()
-        elif line.startswith('    Alias Groups ('):
+        elif line.startswith("    Alias Groups ("):
             while True:
-                yield  {'AliasGroups'}
+                yield {"AliasGroups"}
                 line = i.__next__()
-                if not line.startswith('        '):
+                if not line.startswith("        "):
                     break
             continue
-        elif line == '    Statements {':
+        elif line == "    Statements {":
             while True:
-                yield  {'Statements'}
-                if line == '    }':
+                yield {"Statements"}
+                if line == "    }":
                     break
                 line = i.__next__()
-        elif line == '    RAW dependences:':
-            yield {'RAWDep','BasicDep','Dep','DepInfo'}
+        elif line == "    RAW dependences:":
+            yield {"RAWDep", "BasicDep", "Dep", "DepInfo"}
             line = i.__next__()
-            while line.startswith('        '):
-                yield  {'RAWDep','BasicDep','Dep','DepInfo'}
+            while line.startswith("        "):
+                yield {"RAWDep", "BasicDep", "Dep", "DepInfo"}
                 line = i.__next__()
             continue
-        elif line == '    WAR dependences:':
-            yield {'WARDep','BasicDep','Dep','DepInfo'}
+        elif line == "    WAR dependences:":
+            yield {"WARDep", "BasicDep", "Dep", "DepInfo"}
             line = i.__next__()
-            while line.startswith('        '):
-                yield  {'WARDep','BasicDep','Dep','DepInfo'}
+            while line.startswith("        "):
+                yield {"WARDep", "BasicDep", "Dep", "DepInfo"}
                 line = i.__next__()
             continue
-        elif line == '    WAW dependences:':
-            yield {'WAWDep','BasicDep','Dep','DepInfo'}
+        elif line == "    WAW dependences:":
+            yield {"WAWDep", "BasicDep", "Dep", "DepInfo"}
             line = i.__next__()
-            while line.startswith('        '):
-                yield  {'WAWDep','BasicDep','Dep','DepInfo'}
+            while line.startswith("        "):
+                yield {"WAWDep", "BasicDep", "Dep", "DepInfo"}
                 line = i.__next__()
             continue
-        elif line == '    Reduction dependences:':
-            yield {'RedDep','Dep','DepInfo'}
+        elif line == "    Reduction dependences:":
+            yield {"RedDep", "Dep", "DepInfo"}
             line = i.__next__()
-            while line.startswith('        '):
-                yield  {'RedDep','Dep','DepInfo'}
+            while line.startswith("        "):
+                yield {"RedDep", "Dep", "DepInfo"}
                 line = i.__next__()
             continue
-        elif line == '    Transitive closure of reduction dependences:':
-            yield {'TransitiveClosureDep','DepInfo'}
+        elif line == "    Transitive closure of reduction dependences:":
+            yield {"TransitiveClosureDep", "DepInfo"}
             line = i.__next__()
-            while line.startswith('        '):
-                yield  {'TransitiveClosureDep','DepInfo'}
+            while line.startswith("        "):
+                yield {"TransitiveClosureDep", "DepInfo"}
                 line = i.__next__()
             continue
         elif line.startswith("New access function '"):
-            yield {'NewAccessFunction'}
-        elif line == 'Schedule before flattening {':
+            yield {"NewAccessFunction"}
+        elif line == "Schedule before flattening {":
             while True:
-                yield  {'ScheduleBeforeFlattening'}
-                if line == '}':
+                yield {"ScheduleBeforeFlattening"}
+                if line == "}":
                     break
                 line = i.__next__()
-        elif line == 'Schedule after flattening {':
+        elif line == "Schedule after flattening {":
             while True:
-                yield  {'ScheduleAfterFlattening'}
-                if line == '}':
+                yield {"ScheduleAfterFlattening"}
+                if line == "}":
                     break
                 line = i.__next__()
         else:
@@ -192,15 +204,17 @@
     line = i.__next__()
     while True:
         if funcre.fullmatch(line):
-            while line.startswith('    '):
-                yield  {'FunctionDetail'}
+            while line.startswith("    "):
+                yield {"FunctionDetail"}
                 line = i.__next__()
             continue
-        elif line.startswith("Printing analysis 'Polly - Generate an AST from the SCoP (isl)' for region: "):
-            yield {'PrintingIslAst'}
+        elif line.startswith(
+            "Printing analysis 'Polly - Generate an AST from the SCoP (isl)' for region: "
+        ):
+            yield {"PrintingIslAst"}
             line = i.__next__()
-            while not line.startswith('Printing analysis'):
-                yield  {'AstDetail'}
+            while not line.startswith("Printing analysis"):
+                yield {"AstDetail"}
                 line = i.__next__()
             continue
         else:
@@ -208,22 +222,56 @@
         line = i.__next__()
 
 
-replrepl = {'{{':'{{[{][{]}}','}}': '{{[}][}]}}', '[[':'{{\[\[}}',']]': '{{\]\]}}'}
-replre = re.compile('|'.join(re.escape(k) for k in replrepl.keys()))
+replrepl = {"{{": "{{[{][{]}}", "}}": "{{[}][}]}}", "[[": "{{\[\[}}", "]]": "{{\]\]}}"}
+replre = re.compile("|".join(re.escape(k) for k in replrepl.keys()))
+
 
 def main():
     parser = argparse.ArgumentParser(description="Update CHECK lines")
-    parser.add_argument('testfile',help="File to update (absolute or relative to --testdir)")
-    parser.add_argument('--check-style',choices=['CHECK','CHECK-NEXT'],default='CHECK-NEXT',help="What kind of checks lines to generate")
-    parser.add_argument('--check-position',choices=['end','before-content','autodetect'],default='autodetect',help="Where to add the CHECK lines into the file; 'autodetect' searches for the first 'CHECK' line ind inserts it there")
-    parser.add_argument('--check-include',action='append',default=[], help="What parts of the output lines to check; use syntax 'CHECK=include' to apply to one CHECK-prefix only (by default, everything)")
-    parser.add_argument('--check-label-include',action='append',default=[],help="Use CHECK-LABEL for these includes")
-    parser.add_argument('--check-part-newline',action='store_true',help="Add empty line between different check parts")
-    parser.add_argument('--prefix-only',action='append',default=None,help="Update only these prefixes (default: all)")
-    parser.add_argument('--bindir',help="Location of the opt program")
-    parser.add_argument('--testdir',help="Root dir for unit tests")
-    parser.add_argument('--inplace','-i',action='store_true',help="Replace input file")
-    parser.add_argument('--output','-o',help="Write changed input to this file")
+    parser.add_argument(
+        "testfile", help="File to update (absolute or relative to --testdir)"
+    )
+    parser.add_argument(
+        "--check-style",
+        choices=["CHECK", "CHECK-NEXT"],
+        default="CHECK-NEXT",
+        help="What kind of checks lines to generate",
+    )
+    parser.add_argument(
+        "--check-position",
+        choices=["end", "before-content", "autodetect"],
+        default="autodetect",
+        help="Where to add the CHECK lines into the file; 'autodetect' searches for the first 'CHECK' line ind inserts it there",
+    )
+    parser.add_argument(
+        "--check-include",
+        action="append",
+        default=[],
+        help="What parts of the output lines to check; use syntax 'CHECK=include' to apply to one CHECK-prefix only (by default, everything)",
+    )
+    parser.add_argument(
+        "--check-label-include",
+        action="append",
+        default=[],
+        help="Use CHECK-LABEL for these includes",
+    )
+    parser.add_argument(
+        "--check-part-newline",
+        action="store_true",
+        help="Add empty line between different check parts",
+    )
+    parser.add_argument(
+        "--prefix-only",
+        action="append",
+        default=None,
+        help="Update only these prefixes (default: all)",
+    )
+    parser.add_argument("--bindir", help="Location of the opt program")
+    parser.add_argument("--testdir", help="Root dir for unit tests")
+    parser.add_argument(
+        "--inplace", "-i", action="store_true", help="Replace input file"
+    )
+    parser.add_argument("--output", "-o", help="Write changed input to this file")
     known = parser.parse_args()
 
     if not known.inplace and known.output is None:
@@ -236,13 +284,13 @@
     outfile = known.output
 
     filecheckparser = argparse.ArgumentParser(add_help=False)
-    filecheckparser.add_argument('-check-prefix','--check-prefix',default='CHECK')
+    filecheckparser.add_argument("-check-prefix", "--check-prefix", default="CHECK")
 
     filename = known.testfile
-    for dir in ['.', known.testdir, os.path.join(polly_src_dir,'test'), polly_src_dir]:
+    for dir in [".", known.testdir, os.path.join(polly_src_dir, "test"), polly_src_dir]:
         if not dir:
             continue
-        testfilename = os.path.join(dir,filename)
+        testfilename = os.path.join(dir, filename)
         if os.path.isfile(testfilename):
             filename = testfilename
             break
@@ -253,23 +301,23 @@
     allchecklines = []
     checkprefixes = []
 
-    with open(filename, 'r') as file:
-        oldlines = [line.rstrip('\r\n') for line in file.readlines()]
+    with open(filename, "r") as file:
+        oldlines = [line.rstrip("\r\n") for line in file.readlines()]
 
     runlines = []
     for line in oldlines:
         m = runre.match(line)
         if m:
-            runlines.append(m.group('tool'))
+            runlines.append(m.group("tool"))
 
-    continuation = ''
+    continuation = ""
     newrunlines = []
     for line in runlines:
-        if line.endswith('\\'):
-            continuation += line[:-2] + ' '
+        if line.endswith("\\"):
+            continuation += line[:-2] + " "
         else:
             newrunlines.append(continuation + line)
-            continuation = ''
+            continuation = ""
     if continuation:
         newrunlines.append(continuation)
 
@@ -278,7 +326,7 @@
         if not m:
             continue
 
-        tool, filecheck = m.group('tool', 'filecheck')
+        tool, filecheck = m.group("tool", "filecheck")
         filecheck = shlex.split(filecheck)
         tool = shlex.split(tool)
         if known.bindir is not None:
@@ -295,14 +343,17 @@
         newtool = []
         optstderr = None
         for toolarg in tool:
-            toolarg = toolarg.replace('%s', filename)
-            toolarg = toolarg.replace('%S', os.path.dirname(filename))
-            if toolarg == '%loadPolly':
+            toolarg = toolarg.replace("%s", filename)
+            toolarg = toolarg.replace("%S", os.path.dirname(filename))
+            if toolarg == "%loadPolly":
                 if not llvm_polly_link_into_tools:
-                    newtool += ['-load',os.path.join(polly_lib_dir,'LLVMPolly' + shlibext)]
-                newtool.append('-polly-process-unprofitable')
-                newtool.append('-polly-remarks-minimal')
-            elif toolarg == '2>&1':
+                    newtool += [
+                        "-load",
+                        os.path.join(polly_lib_dir, "LLVMPolly" + shlibext),
+                    ]
+                newtool.append("-polly-process-unprofitable")
+                newtool.append("-polly-remarks-minimal")
+            elif toolarg == "2>&1":
                 optstderr = subprocess.STDOUT
             else:
                 newtool.append(toolarg)
@@ -310,21 +361,25 @@
 
         inpfile = None
         i = 1
-        while i <  len(tool):
-            if tool[i] == '<':
+        while i < len(tool):
+            if tool[i] == "<":
                 inpfile = tool[i + 1]
-                del tool[i:i + 2]
+                del tool[i : i + 2]
                 continue
             i += 1
         if inpfile:
             with open(inpfile) as inp:
-                retlines = subprocess.check_output(tool,universal_newlines=True,stdin=inp,stderr=optstderr)
+                retlines = subprocess.check_output(
+                    tool, universal_newlines=True, stdin=inp, stderr=optstderr
+                )
         else:
-            retlines = subprocess.check_output(tool,universal_newlines=True,stderr=optstderr)
-        retlines = [line.replace('\t', '    ') for line in retlines.splitlines()]
+            retlines = subprocess.check_output(
+                tool, universal_newlines=True, stderr=optstderr
+            )
+        retlines = [line.replace("\t", "    ") for line in retlines.splitlines()]
         check_include = []
         for checkme in known.check_include + known.check_label_include:
-            parts = checkme.split('=')
+            parts = checkme.split("=")
             if len(parts) == 2:
                 if parts[0] == check_prefix:
                     check_include.append(parts[1])
@@ -335,12 +390,17 @@
             filtered_retlines = []
             classified_retlines = []
             lastmatch = None
-            for line,kind in ((line,class1.union(class2)) for line,class1,class2 in zip(retlines,classyfier1(retlines), classyfier2(retlines))):
+            for line, kind in (
+                (line, class1.union(class2))
+                for line, class1, class2 in zip(
+                    retlines, classyfier1(retlines), classyfier2(retlines)
+                )
+            ):
                 match = kind.intersection(check_include)
                 if match:
                     if lastmatch != match:
-                        filtered_retlines.append('')
-                        classified_retlines.append({'Separator'})
+                        filtered_retlines.append("")
+                        classified_retlines.append({"Separator"})
                     filtered_retlines.append(line)
                     classified_retlines.append(kind)
                 lastmatch = match
@@ -350,44 +410,50 @@
             classified_retlines = (set() for line in retlines)
 
         rtrim_emptylines(retlines)
-        ltrim_emptylines(retlines,classified_retlines)
-        retlines = [replre.sub(lambda m: replrepl[m.group(0)], line) for line in retlines]
+        ltrim_emptylines(retlines, classified_retlines)
+        retlines = [
+            replre.sub(lambda m: replrepl[m.group(0)], line) for line in retlines
+        ]
         indent = common_indent(retlines)
         retlines = [line[indent:] for line in retlines]
         checklines = []
         previous_was_empty = True
-        for line,kind in zip(retlines,classified_retlines):
+        for line, kind in zip(retlines, classified_retlines):
             if line:
-                if known.check_style == 'CHECK' and known.check_label_include:
+                if known.check_style == "CHECK" and known.check_label_include:
                     if not kind.isdisjoint(known.check_label_include):
-                        checklines.append('; ' + check_prefix + '-LABEL: ' + line)
+                        checklines.append("; " + check_prefix + "-LABEL: " + line)
                     else:
-                        checklines.append('; ' + check_prefix + ':       ' + line)
-                elif known.check_style == 'CHECK':
-                    checklines.append('; ' + check_prefix + ': ' + line)
+                        checklines.append("; " + check_prefix + ":       " + line)
+                elif known.check_style == "CHECK":
+                    checklines.append("; " + check_prefix + ": " + line)
                 elif known.check_label_include and known.check_label_include:
                     if not kind.isdisjoint(known.check_label_include):
-                        checklines.append('; ' + check_prefix + '-LABEL: ' + line)
+                        checklines.append("; " + check_prefix + "-LABEL: " + line)
                     elif previous_was_empty:
-                        checklines.append('; ' + check_prefix + ':       ' + line)
+                        checklines.append("; " + check_prefix + ":       " + line)
                     else:
-                        checklines.append('; ' + check_prefix + '-NEXT:  ' + line)
+                        checklines.append("; " + check_prefix + "-NEXT:  " + line)
                 else:
                     if previous_was_empty:
-                        checklines.append('; ' + check_prefix + ':      ' + line)
+                        checklines.append("; " + check_prefix + ":      " + line)
                     else:
-                        checklines.append('; ' + check_prefix + '-NEXT: ' + line)
+                        checklines.append("; " + check_prefix + "-NEXT: " + line)
                 previous_was_empty = False
             else:
-                if not 'Separator' in kind or known.check_part_newline:
-                    checklines.append(';')
+                if not "Separator" in kind or known.check_part_newline:
+                    checklines.append(";")
                 previous_was_empty = True
         allchecklines.append(checklines)
 
     if not checkprefixes:
         return
 
-    checkre = re.compile(r'^\s*\;\s*(' + '|'.join([re.escape(s) for s in checkprefixes]) + ')(\-NEXT|\-DAG|\-NOT|\-LABEL|\-SAME)?\s*\:')
+    checkre = re.compile(
+        r"^\s*\;\s*("
+        + "|".join([re.escape(s) for s in checkprefixes])
+        + ")(\-NEXT|\-DAG|\-NOT|\-LABEL|\-SAME)?\s*\:"
+    )
     firstcheckline = None
     firstnoncommentline = None
     headerlines = []
@@ -413,27 +479,30 @@
             uptonowlines = []
             lastwascheck = False
 
-    for i,line in enumerate(newlines):
+    for i, line in enumerate(newlines):
         if not commentline.fullmatch(line):
             firstnoncommentline = i
             break
 
-    with open(outfile,'w',newline='') as file:
+    with open(outfile, "w", newline="") as file:
+
         def writelines(lines):
             for line in lines:
                 file.write(line)
-                file.write('\n')
+                file.write("\n")
 
-        if firstcheckline is not None and known.check_position == 'autodetect':
+        if firstcheckline is not None and known.check_position == "autodetect":
             writelines(newlines[:firstcheckline])
             writelines(uptonowlines)
-            for i,checklines in enumerate(allchecklines):
+            for i, checklines in enumerate(allchecklines):
                 if i != 0:
-                    file.write('\n')
+                    file.write("\n")
                 writelines(checklines)
             writelines(newlines[firstcheckline:])
             writelines(emptylines)
-        elif firstnoncommentline is not None and known.check_position == 'before-content':
+        elif (
+            firstnoncommentline is not None and known.check_position == "before-content"
+        ):
             headerlines = newlines[:firstnoncommentline]
             rtrim_emptylines(headerlines)
             contentlines = newlines[firstnoncommentline:]
@@ -441,9 +510,9 @@
 
             writelines(headerlines)
             for checklines in allchecklines:
-                file.write('\n')
+                file.write("\n")
                 writelines(checklines)
-            file.write('\n')
+            file.write("\n")
             writelines(contentlines)
             writelines(uptonowlines)
             writelines(emptylines)
@@ -451,9 +520,9 @@
             writelines(newlines)
             rtrim_emptylines(newlines)
             for checklines in allchecklines:
-                file.write('\n\n')
+                file.write("\n\n")
                 writelines(checklines)
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     main()
diff --git a/utils/argparse.py b/utils/argparse.py
index a060129..434d326 100644
--- a/utils/argparse.py
+++ b/utils/argparse.py
@@ -75,17 +75,17 @@
 still considered an implementation detail.)
 """
 
-__version__ = '1.1'
+__version__ = "1.1"
 __all__ = [
-    'ArgumentParser',
-    'ArgumentError',
-    'Namespace',
-    'Action',
-    'FileType',
-    'HelpFormatter',
-    'RawDescriptionHelpFormatter',
-    'RawTextHelpFormatter',
-    'ArgumentDefaultsHelpFormatter',
+    "ArgumentParser",
+    "ArgumentError",
+    "Namespace",
+    "Action",
+    "FileType",
+    "HelpFormatter",
+    "RawDescriptionHelpFormatter",
+    "RawTextHelpFormatter",
+    "ArgumentDefaultsHelpFormatter",
 ]
 
 
@@ -120,30 +120,34 @@
 
 
 def _callable(obj):
-    return hasattr(obj, '__call__') or hasattr(obj, '__bases__')
+    return hasattr(obj, "__call__") or hasattr(obj, "__bases__")
+
 
 # silence Python 2.6 buggy warnings about Exception.message
 if _sys.version_info[:2] == (2, 6):
     import warnings
+
     warnings.filterwarnings(
-        action='ignore',
-        message='BaseException.message has been deprecated as of Python 2.6',
+        action="ignore",
+        message="BaseException.message has been deprecated as of Python 2.6",
         category=DeprecationWarning,
-        module='argparse')
+        module="argparse",
+    )
 
 
-SUPPRESS = '==SUPPRESS=='
+SUPPRESS = "==SUPPRESS=="
 
-OPTIONAL = '?'
-ZERO_OR_MORE = '*'
-ONE_OR_MORE = '+'
-PARSER = 'A...'
-REMAINDER = '...'
+OPTIONAL = "?"
+ZERO_OR_MORE = "*"
+ONE_OR_MORE = "+"
+PARSER = "A..."
+REMAINDER = "..."
 
 # =============================
 # Utility functions and classes
 # =============================
 
+
 class _AttributeHolder(object):
     """Abstract base class that provides __repr__.
 
@@ -159,8 +163,8 @@
         for arg in self._get_args():
             arg_strings.append(repr(arg))
         for name, value in self._get_kwargs():
-            arg_strings.append('%s=%r' % (name, value))
-        return '%s(%s)' % (type_name, ', '.join(arg_strings))
+            arg_strings.append("%s=%r" % (name, value))
+        return "%s(%s)" % (type_name, ", ".join(arg_strings))
 
     def _get_kwargs(self):
         return _sorted(self.__dict__.items())
@@ -179,6 +183,7 @@
 # Formatting Help
 # ===============
 
+
 class HelpFormatter(object):
     """Formatter for generating usage messages and argument help strings.
 
@@ -186,16 +191,12 @@
     provided by the class are considered an implementation detail.
     """
 
-    def __init__(self,
-                 prog,
-                 indent_increment=2,
-                 max_help_position=24,
-                 width=None):
+    def __init__(self, prog, indent_increment=2, max_help_position=24, width=None):
 
         # default setting for width
         if width is None:
             try:
-                width = int(_os.environ['COLUMNS'])
+                width = int(_os.environ["COLUMNS"])
             except (KeyError, ValueError):
                 width = 80
             width -= 2
@@ -212,8 +213,8 @@
         self._root_section = self._Section(self, None)
         self._current_section = self._root_section
 
-        self._whitespace_matcher = _re.compile(r'\s+')
-        self._long_break_matcher = _re.compile(r'\n\n\n+')
+        self._whitespace_matcher = _re.compile(r"\s+")
+        self._long_break_matcher = _re.compile(r"\n\n\n+")
 
     # ===============================
     # Section and indentation methods
@@ -224,11 +225,10 @@
 
     def _dedent(self):
         self._current_indent -= self._indent_increment
-        assert self._current_indent >= 0, 'Indent decreased below 0.'
+        assert self._current_indent >= 0, "Indent decreased below 0."
         self._level -= 1
 
     class _Section(object):
-
         def __init__(self, formatter, parent, heading=None):
             self.formatter = formatter
             self.parent = parent
@@ -248,17 +248,17 @@
 
             # return nothing if the section was empty
             if not item_help:
-                return ''
+                return ""
 
             # add the heading if the section was non-empty
             if self.heading is not SUPPRESS and self.heading is not None:
                 current_indent = self.formatter._current_indent
-                heading = '%*s%s:\n' % (current_indent, '', self.heading)
+                heading = "%*s%s:\n" % (current_indent, "", self.heading)
             else:
-                heading = ''
+                heading = ""
 
             # join the section-initial newline, the heading and the help
-            return join(['\n', heading, item_help, '\n'])
+            return join(["\n", heading, item_help, "\n"])
 
     def _add_item(self, func, args):
         self._current_section.items.append((func, args))
@@ -297,8 +297,7 @@
             # update the maximum item length
             invocation_length = max([len(s) for s in invocations])
             action_length = invocation_length + self._current_indent
-            self._action_max_length = max(self._action_max_length,
-                                          action_length)
+            self._action_max_length = max(self._action_max_length, action_length)
 
             # add the item to the list
             self._add_item(self._format_action, [action])
@@ -313,18 +312,16 @@
     def format_help(self):
         help = self._root_section.format_help()
         if help:
-            help = self._long_break_matcher.sub('\n\n', help)
-            help = help.strip('\n') + '\n'
+            help = self._long_break_matcher.sub("\n\n", help)
+            help = help.strip("\n") + "\n"
         return help
 
     def _join_parts(self, part_strings):
-        return ''.join([part
-                        for part in part_strings
-                        if part and part is not SUPPRESS])
+        return "".join([part for part in part_strings if part and part is not SUPPRESS])
 
     def _format_usage(self, usage, actions, groups, prefix):
         if prefix is None:
-            prefix = _('usage: ')
+            prefix = _("usage: ")
 
         # if usage is specified, use that
         if usage is not None:
@@ -332,11 +329,11 @@
 
         # if no optionals or positionals are available, usage is just prog
         elif usage is None and not actions:
-            usage = '%(prog)s' % dict(prog=self._prog)
+            usage = "%(prog)s" % dict(prog=self._prog)
 
         # if optionals and positionals are available, calculate usage
         elif usage is None:
-            prog = '%(prog)s' % dict(prog=self._prog)
+            prog = "%(prog)s" % dict(prog=self._prog)
 
             # split optionals from positionals
             optionals = []
@@ -350,20 +347,20 @@
             # build full usage string
             format = self._format_actions_usage
             action_usage = format(optionals + positionals, groups)
-            usage = ' '.join([s for s in [prog, action_usage] if s])
+            usage = " ".join([s for s in [prog, action_usage] if s])
 
             # wrap the usage parts if it's too long
             text_width = self._width - self._current_indent
             if len(prefix) + len(usage) > text_width:
 
                 # break usage into wrappable parts
-                part_regexp = r'\(.*?\)+|\[.*?\]+|\S+'
+                part_regexp = r"\(.*?\)+|\[.*?\]+|\S+"
                 opt_usage = format(optionals, groups)
                 pos_usage = format(positionals, groups)
                 opt_parts = _re.findall(part_regexp, opt_usage)
                 pos_parts = _re.findall(part_regexp, pos_usage)
-                assert ' '.join(opt_parts) == opt_usage
-                assert ' '.join(pos_parts) == pos_usage
+                assert " ".join(opt_parts) == opt_usage
+                assert " ".join(pos_parts) == pos_usage
 
                 # helper for wrapping lines
                 def get_lines(parts, indent, prefix=None):
@@ -375,20 +372,20 @@
                         line_len = len(indent) - 1
                     for part in parts:
                         if line_len + 1 + len(part) > text_width:
-                            lines.append(indent + ' '.join(line))
+                            lines.append(indent + " ".join(line))
                             line = []
                             line_len = len(indent) - 1
                         line.append(part)
                         line_len += len(part) + 1
                     if line:
-                        lines.append(indent + ' '.join(line))
+                        lines.append(indent + " ".join(line))
                     if prefix is not None:
-                        lines[0] = lines[0][len(indent):]
+                        lines[0] = lines[0][len(indent) :]
                     return lines
 
                 # if prog is short, follow it with optionals or positionals
                 if len(prefix) + len(prog) <= 0.75 * text_width:
-                    indent = ' ' * (len(prefix) + len(prog) + 1)
+                    indent = " " * (len(prefix) + len(prog) + 1)
                     if opt_parts:
                         lines = get_lines([prog] + opt_parts, indent, prefix)
                         lines.extend(get_lines(pos_parts, indent))
@@ -399,7 +396,7 @@
 
                 # if prog is long, put it on its own line
                 else:
-                    indent = ' ' * len(prefix)
+                    indent = " " * len(prefix)
                     parts = opt_parts + pos_parts
                     lines = get_lines(parts, indent)
                     if len(lines) > 1:
@@ -409,10 +406,10 @@
                     lines = [prog] + lines
 
                 # join lines into usage
-                usage = '\n'.join(lines)
+                usage = "\n".join(lines)
 
         # prefix with 'usage:'
-        return '%s%s\n\n' % (prefix, usage)
+        return "%s%s\n\n" % (prefix, usage)
 
     def _format_actions_usage(self, actions, groups):
         # find group indices and identify actions in groups
@@ -429,13 +426,13 @@
                     for action in group._group_actions:
                         group_actions.add(action)
                     if not group.required:
-                        inserts[start] = '['
-                        inserts[end] = ']'
+                        inserts[start] = "["
+                        inserts[end] = "]"
                     else:
-                        inserts[start] = '('
-                        inserts[end] = ')'
+                        inserts[start] = "("
+                        inserts[end] = ")"
                     for i in range(start + 1, end):
-                        inserts[i] = '|'
+                        inserts[i] = "|"
 
         # collect all actions format strings
         parts = []
@@ -445,9 +442,9 @@
             # remove | separators for suppressed arguments
             if action.help is SUPPRESS:
                 parts.append(None)
-                if inserts.get(i) == '|':
+                if inserts.get(i) == "|":
                     inserts.pop(i)
-                elif inserts.get(i + 1) == '|':
+                elif inserts.get(i + 1) == "|":
                     inserts.pop(i + 1)
 
             # produce all arg strings
@@ -456,7 +453,7 @@
 
                 # if it's in a group, strip the outer []
                 if action in group_actions:
-                    if part[0] == '[' and part[-1] == ']':
+                    if part[0] == "[" and part[-1] == "]":
                         part = part[1:-1]
 
                 # add the action string to the list
@@ -469,18 +466,18 @@
                 # if the Optional doesn't take a value, format is:
                 #    -s or --long
                 if action.nargs == 0:
-                    part = '%s' % option_string
+                    part = "%s" % option_string
 
                 # if the Optional takes a value, format is:
                 #    -s ARGS or --long ARGS
                 else:
                     default = action.dest.upper()
                     args_string = self._format_args(action, default)
-                    part = '%s %s' % (option_string, args_string)
+                    part = "%s %s" % (option_string, args_string)
 
                 # make it look optional if it's not required or in a group
                 if not action.required and action not in group_actions:
-                    part = '[%s]' % part
+                    part = "[%s]" % part
 
                 # add the action string to the list
                 parts.append(part)
@@ -490,50 +487,49 @@
             parts[i:i] = [inserts[i]]
 
         # join all the action items with spaces
-        text = ' '.join([item for item in parts if item is not None])
+        text = " ".join([item for item in parts if item is not None])
 
         # clean up separators for mutually exclusive groups
-        open = r'[\[(]'
-        close = r'[\])]'
-        text = _re.sub(r'(%s) ' % open, r'\1', text)
-        text = _re.sub(r' (%s)' % close, r'\1', text)
-        text = _re.sub(r'%s *%s' % (open, close), r'', text)
-        text = _re.sub(r'\(([^|]*)\)', r'\1', text)
+        open = r"[\[(]"
+        close = r"[\])]"
+        text = _re.sub(r"(%s) " % open, r"\1", text)
+        text = _re.sub(r" (%s)" % close, r"\1", text)
+        text = _re.sub(r"%s *%s" % (open, close), r"", text)
+        text = _re.sub(r"\(([^|]*)\)", r"\1", text)
         text = text.strip()
 
         # return the text
         return text
 
     def _format_text(self, text):
-        if '%(prog)' in text:
+        if "%(prog)" in text:
             text = text % dict(prog=self._prog)
         text_width = self._width - self._current_indent
-        indent = ' ' * self._current_indent
-        return self._fill_text(text, text_width, indent) + '\n\n'
+        indent = " " * self._current_indent
+        return self._fill_text(text, text_width, indent) + "\n\n"
 
     def _format_action(self, action):
         # determine the required width and the entry label
-        help_position = min(self._action_max_length + 2,
-                            self._max_help_position)
+        help_position = min(self._action_max_length + 2, self._max_help_position)
         help_width = self._width - help_position
         action_width = help_position - self._current_indent - 2
         action_header = self._format_action_invocation(action)
 
         # ho nelp; start on same line and add a final newline
         if not action.help:
-            tup = self._current_indent, '', action_header
-            action_header = '%*s%s\n' % tup
+            tup = self._current_indent, "", action_header
+            action_header = "%*s%s\n" % tup
 
         # short action name; start on the same line and pad two spaces
         elif len(action_header) <= action_width:
-            tup = self._current_indent, '', action_width, action_header
-            action_header = '%*s%-*s  ' % tup
+            tup = self._current_indent, "", action_width, action_header
+            action_header = "%*s%-*s  " % tup
             indent_first = 0
 
         # long action name; start on the next line
         else:
-            tup = self._current_indent, '', action_header
-            action_header = '%*s%s\n' % tup
+            tup = self._current_indent, "", action_header
+            action_header = "%*s%s\n" % tup
             indent_first = help_position
 
         # collect the pieces of the action help
@@ -543,13 +539,13 @@
         if action.help:
             help_text = self._expand_help(action)
             help_lines = self._split_lines(help_text, help_width)
-            parts.append('%*s%s\n' % (indent_first, '', help_lines[0]))
+            parts.append("%*s%s\n" % (indent_first, "", help_lines[0]))
             for line in help_lines[1:]:
-                parts.append('%*s%s\n' % (help_position, '', line))
+                parts.append("%*s%s\n" % (help_position, "", line))
 
         # or add a newline if the description doesn't end with one
-        elif not action_header.endswith('\n'):
-            parts.append('\n')
+        elif not action_header.endswith("\n"):
+            parts.append("\n")
 
         # if there are any sub-actions, add their help as well
         for subaction in self._iter_indented_subactions(action):
@@ -560,7 +556,7 @@
 
     def _format_action_invocation(self, action):
         if not action.option_strings:
-            metavar, = self._metavar_formatter(action, action.dest)(1)
+            (metavar,) = self._metavar_formatter(action, action.dest)(1)
             return metavar
 
         else:
@@ -577,16 +573,16 @@
                 default = action.dest.upper()
                 args_string = self._format_args(action, default)
                 for option_string in action.option_strings:
-                    parts.append('%s %s' % (option_string, args_string))
+                    parts.append("%s %s" % (option_string, args_string))
 
-            return ', '.join(parts)
+            return ", ".join(parts)
 
     def _metavar_formatter(self, action, default_metavar):
         if action.metavar is not None:
             result = action.metavar
         elif action.choices is not None:
             choice_strs = [str(choice) for choice in action.choices]
-            result = '{%s}' % ','.join(choice_strs)
+            result = "{%s}" % ",".join(choice_strs)
         else:
             result = default_metavar
 
@@ -594,26 +590,27 @@
             if isinstance(result, tuple):
                 return result
             else:
-                return (result, ) * tuple_size
+                return (result,) * tuple_size
+
         return format
 
     def _format_args(self, action, default_metavar):
         get_metavar = self._metavar_formatter(action, default_metavar)
         if action.nargs is None:
-            result = '%s' % get_metavar(1)
+            result = "%s" % get_metavar(1)
         elif action.nargs == OPTIONAL:
-            result = '[%s]' % get_metavar(1)
+            result = "[%s]" % get_metavar(1)
         elif action.nargs == ZERO_OR_MORE:
-            result = '[%s [%s ...]]' % get_metavar(2)
+            result = "[%s [%s ...]]" % get_metavar(2)
         elif action.nargs == ONE_OR_MORE:
-            result = '%s [%s ...]' % get_metavar(2)
+            result = "%s [%s ...]" % get_metavar(2)
         elif action.nargs == REMAINDER:
-            result = '...'
+            result = "..."
         elif action.nargs == PARSER:
-            result = '%s ...' % get_metavar(1)
+            result = "%s ..." % get_metavar(1)
         else:
-            formats = ['%s' for _ in range(action.nargs)]
-            result = ' '.join(formats) % get_metavar(action.nargs)
+            formats = ["%s" for _ in range(action.nargs)]
+            result = " ".join(formats) % get_metavar(action.nargs)
         return result
 
     def _expand_help(self, action):
@@ -622,11 +619,11 @@
             if params[name] is SUPPRESS:
                 del params[name]
         for name in list(params):
-            if hasattr(params[name], '__name__'):
+            if hasattr(params[name], "__name__"):
                 params[name] = params[name].__name__
-        if params.get('choices') is not None:
-            choices_str = ', '.join([str(c) for c in params['choices']])
-            params['choices'] = choices_str
+        if params.get("choices") is not None:
+            choices_str = ", ".join([str(c) for c in params["choices"]])
+            params["choices"] = choices_str
         return self._get_help_string(action) % params
 
     def _iter_indented_subactions(self, action):
@@ -641,13 +638,14 @@
             self._dedent()
 
     def _split_lines(self, text, width):
-        text = self._whitespace_matcher.sub(' ', text).strip()
+        text = self._whitespace_matcher.sub(" ", text).strip()
         return _textwrap.wrap(text, width)
 
     def _fill_text(self, text, width, indent):
-        text = self._whitespace_matcher.sub(' ', text).strip()
-        return _textwrap.fill(text, width, initial_indent=indent,
-                                           subsequent_indent=indent)
+        text = self._whitespace_matcher.sub(" ", text).strip()
+        return _textwrap.fill(
+            text, width, initial_indent=indent, subsequent_indent=indent
+        )
 
     def _get_help_string(self, action):
         return action.help
@@ -661,7 +659,7 @@
     """
 
     def _fill_text(self, text, width, indent):
-        return ''.join([indent + line for line in text.splitlines(True)])
+        return "".join([indent + line for line in text.splitlines(True)])
 
 
 class RawTextHelpFormatter(RawDescriptionHelpFormatter):
@@ -684,11 +682,11 @@
 
     def _get_help_string(self, action):
         help = action.help
-        if '%(default)' not in action.help:
+        if "%(default)" not in action.help:
             if action.default is not SUPPRESS:
                 defaulting_nargs = [OPTIONAL, ZERO_OR_MORE]
                 if action.option_strings or action.nargs in defaulting_nargs:
-                    help += ' (default: %(default)s)'
+                    help += " (default: %(default)s)"
         return help
 
 
@@ -696,11 +694,12 @@
 # Options and Arguments
 # =====================
 
+
 def _get_action_name(argument):
     if argument is None:
         return None
     elif argument.option_strings:
-        return  '/'.join(argument.option_strings)
+        return "/".join(argument.option_strings)
     elif argument.metavar not in (None, SUPPRESS):
         return argument.metavar
     elif argument.dest not in (None, SUPPRESS):
@@ -722,15 +721,15 @@
 
     def __str__(self):
         if self.argument_name is None:
-            format = '%(message)s'
+            format = "%(message)s"
         else:
-            format = 'argument %(argument_name)s: %(message)s'
-        return format % dict(message=self.message,
-                             argument_name=self.argument_name)
+            format = "argument %(argument_name)s: %(message)s"
+        return format % dict(message=self.message, argument_name=self.argument_name)
 
 
 class ArgumentTypeError(Exception):
     """An error from trying to convert a command line string to a type."""
+
     pass
 
 
@@ -738,6 +737,7 @@
 # Action classes
 # ==============
 
+
 class Action(_AttributeHolder):
     """Information about how to convert command line strings to Python objects.
 
@@ -789,17 +789,19 @@
             help string. If None, the 'dest' value will be used as the name.
     """
 
-    def __init__(self,
-                 option_strings,
-                 dest,
-                 nargs=None,
-                 const=None,
-                 default=None,
-                 type=None,
-                 choices=None,
-                 required=False,
-                 help=None,
-                 metavar=None):
+    def __init__(
+        self,
+        option_strings,
+        dest,
+        nargs=None,
+        const=None,
+        default=None,
+        type=None,
+        choices=None,
+        required=False,
+        help=None,
+        metavar=None,
+    ):
         self.option_strings = option_strings
         self.dest = dest
         self.nargs = nargs
@@ -813,41 +815,44 @@
 
     def _get_kwargs(self):
         names = [
-            'option_strings',
-            'dest',
-            'nargs',
-            'const',
-            'default',
-            'type',
-            'choices',
-            'help',
-            'metavar',
+            "option_strings",
+            "dest",
+            "nargs",
+            "const",
+            "default",
+            "type",
+            "choices",
+            "help",
+            "metavar",
         ]
         return [(name, getattr(self, name)) for name in names]
 
     def __call__(self, parser, namespace, values, option_string=None):
-        raise NotImplementedError(_('.__call__() not defined'))
+        raise NotImplementedError(_(".__call__() not defined"))
 
 
 class _StoreAction(Action):
-
-    def __init__(self,
-                 option_strings,
-                 dest,
-                 nargs=None,
-                 const=None,
-                 default=None,
-                 type=None,
-                 choices=None,
-                 required=False,
-                 help=None,
-                 metavar=None):
+    def __init__(
+        self,
+        option_strings,
+        dest,
+        nargs=None,
+        const=None,
+        default=None,
+        type=None,
+        choices=None,
+        required=False,
+        help=None,
+        metavar=None,
+    ):
         if nargs == 0:
-            raise ValueError('nargs for store actions must be > 0; if you '
-                             'have nothing to store, actions such as store '
-                             'true or store const may be more appropriate')
+            raise ValueError(
+                "nargs for store actions must be > 0; if you "
+                "have nothing to store, actions such as store "
+                "true or store const may be more appropriate"
+            )
         if const is not None and nargs != OPTIONAL:
-            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
+            raise ValueError("nargs must be %r to supply const" % OPTIONAL)
         super(_StoreAction, self).__init__(
             option_strings=option_strings,
             dest=dest,
@@ -858,22 +863,24 @@
             choices=choices,
             required=required,
             help=help,
-            metavar=metavar)
+            metavar=metavar,
+        )
 
     def __call__(self, parser, namespace, values, option_string=None):
         setattr(namespace, self.dest, values)
 
 
 class _StoreConstAction(Action):
-
-    def __init__(self,
-                 option_strings,
-                 dest,
-                 const,
-                 default=None,
-                 required=False,
-                 help=None,
-                 metavar=None):
+    def __init__(
+        self,
+        option_strings,
+        dest,
+        const,
+        default=None,
+        required=False,
+        help=None,
+        metavar=None,
+    ):
         super(_StoreConstAction, self).__init__(
             option_strings=option_strings,
             dest=dest,
@@ -881,65 +888,59 @@
             const=const,
             default=default,
             required=required,
-            help=help)
+            help=help,
+        )
 
     def __call__(self, parser, namespace, values, option_string=None):
         setattr(namespace, self.dest, self.const)
 
 
 class _StoreTrueAction(_StoreConstAction):
-
-    def __init__(self,
-                 option_strings,
-                 dest,
-                 default=False,
-                 required=False,
-                 help=None):
+    def __init__(self, option_strings, dest, default=False, required=False, help=None):
         super(_StoreTrueAction, self).__init__(
             option_strings=option_strings,
             dest=dest,
             const=True,
             default=default,
             required=required,
-            help=help)
+            help=help,
+        )
 
 
 class _StoreFalseAction(_StoreConstAction):
-
-    def __init__(self,
-                 option_strings,
-                 dest,
-                 default=True,
-                 required=False,
-                 help=None):
+    def __init__(self, option_strings, dest, default=True, required=False, help=None):
         super(_StoreFalseAction, self).__init__(
             option_strings=option_strings,
             dest=dest,
             const=False,
             default=default,
             required=required,
-            help=help)
+            help=help,
+        )
 
 
 class _AppendAction(Action):
-
-    def __init__(self,
-                 option_strings,
-                 dest,
-                 nargs=None,
-                 const=None,
-                 default=None,
-                 type=None,
-                 choices=None,
-                 required=False,
-                 help=None,
-                 metavar=None):
+    def __init__(
+        self,
+        option_strings,
+        dest,
+        nargs=None,
+        const=None,
+        default=None,
+        type=None,
+        choices=None,
+        required=False,
+        help=None,
+        metavar=None,
+    ):
         if nargs == 0:
-            raise ValueError('nargs for append actions must be > 0; if arg '
-                             'strings are not supplying the value to append, '
-                             'the append const action may be more appropriate')
+            raise ValueError(
+                "nargs for append actions must be > 0; if arg "
+                "strings are not supplying the value to append, "
+                "the append const action may be more appropriate"
+            )
         if const is not None and nargs != OPTIONAL:
-            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
+            raise ValueError("nargs must be %r to supply const" % OPTIONAL)
         super(_AppendAction, self).__init__(
             option_strings=option_strings,
             dest=dest,
@@ -950,7 +951,8 @@
             choices=choices,
             required=required,
             help=help,
-            metavar=metavar)
+            metavar=metavar,
+        )
 
     def __call__(self, parser, namespace, values, option_string=None):
         items = _copy.copy(_ensure_value(namespace, self.dest, []))
@@ -959,15 +961,16 @@
 
 
 class _AppendConstAction(Action):
-
-    def __init__(self,
-                 option_strings,
-                 dest,
-                 const,
-                 default=None,
-                 required=False,
-                 help=None,
-                 metavar=None):
+    def __init__(
+        self,
+        option_strings,
+        dest,
+        const,
+        default=None,
+        required=False,
+        help=None,
+        metavar=None,
+    ):
         super(_AppendConstAction, self).__init__(
             option_strings=option_strings,
             dest=dest,
@@ -976,7 +979,8 @@
             default=default,
             required=required,
             help=help,
-            metavar=metavar)
+            metavar=metavar,
+        )
 
     def __call__(self, parser, namespace, values, option_string=None):
         items = _copy.copy(_ensure_value(namespace, self.dest, []))
@@ -985,20 +989,15 @@
 
 
 class _CountAction(Action):
-
-    def __init__(self,
-                 option_strings,
-                 dest,
-                 default=None,
-                 required=False,
-                 help=None):
+    def __init__(self, option_strings, dest, default=None, required=False, help=None):
         super(_CountAction, self).__init__(
             option_strings=option_strings,
             dest=dest,
             nargs=0,
             default=default,
             required=required,
-            help=help)
+            help=help,
+        )
 
     def __call__(self, parser, namespace, values, option_string=None):
         new_count = _ensure_value(namespace, self.dest, 0) + 1
@@ -1006,18 +1005,14 @@
 
 
 class _HelpAction(Action):
-
-    def __init__(self,
-                 option_strings,
-                 dest=SUPPRESS,
-                 default=SUPPRESS,
-                 help=None):
+    def __init__(self, option_strings, dest=SUPPRESS, default=SUPPRESS, help=None):
         super(_HelpAction, self).__init__(
             option_strings=option_strings,
             dest=dest,
             default=default,
             nargs=0,
-            help=help)
+            help=help,
+        )
 
     def __call__(self, parser, namespace, values, option_string=None):
         parser.print_help()
@@ -1025,19 +1020,16 @@
 
 
 class _VersionAction(Action):
-
-    def __init__(self,
-                 option_strings,
-                 version=None,
-                 dest=SUPPRESS,
-                 default=SUPPRESS,
-                 help=None):
+    def __init__(
+        self, option_strings, version=None, dest=SUPPRESS, default=SUPPRESS, help=None
+    ):
         super(_VersionAction, self).__init__(
             option_strings=option_strings,
             dest=dest,
             default=default,
             nargs=0,
-            help=help)
+            help=help,
+        )
         self.version = version
 
     def __call__(self, parser, namespace, values, option_string=None):
@@ -1050,20 +1042,14 @@
 
 
 class _SubParsersAction(Action):
-
     class _ChoicesPseudoAction(Action):
-
         def __init__(self, name, help):
             sup = super(_SubParsersAction._ChoicesPseudoAction, self)
             sup.__init__(option_strings=[], dest=name, help=help)
 
-    def __init__(self,
-                 option_strings,
-                 prog,
-                 parser_class,
-                 dest=SUPPRESS,
-                 help=None,
-                 metavar=None):
+    def __init__(
+        self, option_strings, prog, parser_class, dest=SUPPRESS, help=None, metavar=None
+    ):
 
         self._prog_prefix = prog
         self._parser_class = parser_class
@@ -1076,16 +1062,17 @@
             nargs=PARSER,
             choices=self._name_parser_map,
             help=help,
-            metavar=metavar)
+            metavar=metavar,
+        )
 
     def add_parser(self, name, **kwargs):
         # set prog from the existing prefix
-        if kwargs.get('prog') is None:
-            kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
+        if kwargs.get("prog") is None:
+            kwargs["prog"] = "%s %s" % (self._prog_prefix, name)
 
         # create a pseudo-action to hold the choice help
-        if 'help' in kwargs:
-            help = kwargs.pop('help')
+        if "help" in kwargs:
+            help = kwargs.pop("help")
             choice_action = self._ChoicesPseudoAction(name, help)
             self._choices_actions.append(choice_action)
 
@@ -1109,8 +1096,8 @@
         try:
             parser = self._name_parser_map[parser_name]
         except KeyError:
-            tup = parser_name, ', '.join(self._name_parser_map)
-            msg = _('unknown parser %r (choices: %s)' % tup)
+            tup = parser_name, ", ".join(self._name_parser_map)
+            msg = _("unknown parser %r (choices: %s)" % tup)
             raise ArgumentError(self, msg)
 
         # parse all the remaining options into the namespace
@@ -1121,6 +1108,7 @@
 # Type classes
 # ==============
 
+
 class FileType(object):
     """Factory for creating file object types
 
@@ -1134,16 +1122,16 @@
             the builtin open() function.
     """
 
-    def __init__(self, mode='r', bufsize=None):
+    def __init__(self, mode="r", bufsize=None):
         self._mode = mode
         self._bufsize = bufsize
 
     def __call__(self, string):
         # the special argument "-" means sys.std{in,out}
-        if string == '-':
-            if 'r' in self._mode:
+        if string == "-":
+            if "r" in self._mode:
                 return _sys.stdin
-            elif 'w' in self._mode:
+            elif "w" in self._mode:
                 return _sys.stdout
             else:
                 msg = _('argument "-" with mode %r' % self._mode)
@@ -1157,13 +1145,15 @@
 
     def __repr__(self):
         args = [self._mode, self._bufsize]
-        args_str = ', '.join([repr(arg) for arg in args if arg is not None])
-        return '%s(%s)' % (type(self).__name__, args_str)
+        args_str = ", ".join([repr(arg) for arg in args if arg is not None])
+        return "%s(%s)" % (type(self).__name__, args_str)
+
 
 # ===========================
 # Optional and Positional Parsing
 # ===========================
 
+
 class Namespace(_AttributeHolder):
     """Simple object for storing attributes.
 
@@ -1186,12 +1176,7 @@
 
 
 class _ActionsContainer(object):
-
-    def __init__(self,
-                 description,
-                 prefix_chars,
-                 argument_default,
-                 conflict_handler):
+    def __init__(self, description, prefix_chars, argument_default, conflict_handler):
         super(_ActionsContainer, self).__init__()
 
         self.description = description
@@ -1203,17 +1188,17 @@
         self._registries = {}
 
         # register actions
-        self.register('action', None, _StoreAction)
-        self.register('action', 'store', _StoreAction)
-        self.register('action', 'store_const', _StoreConstAction)
-        self.register('action', 'store_true', _StoreTrueAction)
-        self.register('action', 'store_false', _StoreFalseAction)
-        self.register('action', 'append', _AppendAction)
-        self.register('action', 'append_const', _AppendConstAction)
-        self.register('action', 'count', _CountAction)
-        self.register('action', 'help', _HelpAction)
-        self.register('action', 'version', _VersionAction)
-        self.register('action', 'parsers', _SubParsersAction)
+        self.register("action", None, _StoreAction)
+        self.register("action", "store", _StoreAction)
+        self.register("action", "store_const", _StoreConstAction)
+        self.register("action", "store_true", _StoreTrueAction)
+        self.register("action", "store_false", _StoreFalseAction)
+        self.register("action", "append", _AppendAction)
+        self.register("action", "append_const", _AppendConstAction)
+        self.register("action", "count", _CountAction)
+        self.register("action", "help", _HelpAction)
+        self.register("action", "version", _VersionAction)
+        self.register("action", "parsers", _SubParsersAction)
 
         # raise an exception if the conflict handler is invalid
         self._get_handler()
@@ -1230,7 +1215,7 @@
         self._defaults = {}
 
         # determines whether an "option" looks like a negative number
-        self._negative_number_matcher = _re.compile(r'^-\d+$|^-\d*\.\d+$')
+        self._negative_number_matcher = _re.compile(r"^-\d+$|^-\d*\.\d+$")
 
         # whether or not there are any optionals that look like negative
         # numbers -- uses a list so it can be shared and edited
@@ -1264,7 +1249,6 @@
                 return action.default
         return self._defaults.get(dest, None)
 
-
     # =======================
     # Adding argument actions
     # =======================
@@ -1279,8 +1263,8 @@
         # argument
         chars = self.prefix_chars
         if not args or len(args) == 1 and args[0][0] not in chars:
-            if args and 'dest' in kwargs:
-                raise ValueError('dest supplied twice for positional argument')
+            if args and "dest" in kwargs:
+                raise ValueError("dest supplied twice for positional argument")
             kwargs = self._get_positional_kwargs(*args, **kwargs)
 
         # otherwise, we're adding an optional argument
@@ -1288,12 +1272,12 @@
             kwargs = self._get_optional_kwargs(*args, **kwargs)
 
         # if no default was supplied, use the parser-level default
-        if 'default' not in kwargs:
-            dest = kwargs['dest']
+        if "default" not in kwargs:
+            dest = kwargs["dest"]
             if dest in self._defaults:
-                kwargs['default'] = self._defaults[dest]
+                kwargs["default"] = self._defaults[dest]
             elif self.argument_default is not None:
-                kwargs['default'] = self.argument_default
+                kwargs["default"] = self.argument_default
 
         # create the action object, and add it to the parser
         action_class = self._pop_action_class(kwargs)
@@ -1302,9 +1286,9 @@
         action = action_class(**kwargs)
 
         # raise an error if the action type is not callable
-        type_func = self._registry_get('type', action.type, action.type)
+        type_func = self._registry_get("type", action.type, action.type)
         if not _callable(type_func):
-            raise ValueError('%r is not callable' % type_func)
+            raise ValueError("%r is not callable" % type_func)
 
         return self._add_action(action)
 
@@ -1347,7 +1331,7 @@
         title_group_map = {}
         for group in self._action_groups:
             if group.title in title_group_map:
-                msg = _('cannot merge actions - two groups are named %r')
+                msg = _("cannot merge actions - two groups are named %r")
                 raise ValueError(msg % (group.title))
             title_group_map[group.title] = group
 
@@ -1361,7 +1345,8 @@
                 title_group_map[group.title] = self.add_argument_group(
                     title=group.title,
                     description=group.description,
-                    conflict_handler=group.conflict_handler)
+                    conflict_handler=group.conflict_handler,
+                )
 
             # map the actions to their new group
             for action in group._group_actions:
@@ -1371,8 +1356,7 @@
         # NOTE: if add_mutually_exclusive_group ever gains title= and
         # description= then this code will need to be expanded as above
         for group in container._mutually_exclusive_groups:
-            mutex_group = self.add_mutually_exclusive_group(
-                required=group.required)
+            mutex_group = self.add_mutually_exclusive_group(required=group.required)
 
             # map the actions to their new mutex group
             for action in group._group_actions:
@@ -1384,16 +1368,16 @@
 
     def _get_positional_kwargs(self, dest, **kwargs):
         # make sure required is not specified
-        if 'required' in kwargs:
+        if "required" in kwargs:
             msg = _("'required' is an invalid argument for positionals")
             raise TypeError(msg)
 
         # mark positional arguments as required if at least one is
         # always required
-        if kwargs.get('nargs') not in [OPTIONAL, ZERO_OR_MORE]:
-            kwargs['required'] = True
-        if kwargs.get('nargs') == ZERO_OR_MORE and 'default' not in kwargs:
-            kwargs['required'] = True
+        if kwargs.get("nargs") not in [OPTIONAL, ZERO_OR_MORE]:
+            kwargs["required"] = True
+        if kwargs.get("nargs") == ZERO_OR_MORE and "default" not in kwargs:
+            kwargs["required"] = True
 
         # return the keyword arguments with no option strings
         return dict(kwargs, dest=dest, option_strings=[])
@@ -1405,8 +1389,7 @@
         for option_string in args:
             # error on strings that don't start with an appropriate prefix
             if not option_string[0] in self.prefix_chars:
-                msg = _('invalid option string %r: '
-                        'must start with a character %r')
+                msg = _("invalid option string %r: " "must start with a character %r")
                 tup = option_string, self.prefix_chars
                 raise ValueError(msg % tup)
 
@@ -1418,7 +1401,7 @@
                         long_option_strings.append(option_string)
 
         # infer destination, '--foo-bar' -> 'foo_bar' and '-x' -> 'x'
-        dest = kwargs.pop('dest', None)
+        dest = kwargs.pop("dest", None)
         if dest is None:
             if long_option_strings:
                 dest_option_string = long_option_strings[0]
@@ -1426,24 +1409,24 @@
                 dest_option_string = option_strings[0]
             dest = dest_option_string.lstrip(self.prefix_chars)
             if not dest:
-                msg = _('dest= is required for options like %r')
+                msg = _("dest= is required for options like %r")
                 raise ValueError(msg % option_string)
-            dest = dest.replace('-', '_')
+            dest = dest.replace("-", "_")
 
         # return the updated keyword arguments
         return dict(kwargs, dest=dest, option_strings=option_strings)
 
     def _pop_action_class(self, kwargs, default=None):
-        action = kwargs.pop('action', default)
-        return self._registry_get('action', action, action)
+        action = kwargs.pop("action", default)
+        return self._registry_get("action", action, action)
 
     def _get_handler(self):
         # determine function from conflict handler string
-        handler_func_name = '_handle_conflict_%s' % self.conflict_handler
+        handler_func_name = "_handle_conflict_%s" % self.conflict_handler
         try:
             return getattr(self, handler_func_name)
         except AttributeError:
-            msg = _('invalid conflict_resolution value: %r')
+            msg = _("invalid conflict_resolution value: %r")
             raise ValueError(msg % self.conflict_handler)
 
     def _check_conflict(self, action):
@@ -1461,10 +1444,10 @@
             conflict_handler(action, confl_optionals)
 
     def _handle_conflict_error(self, action, conflicting_actions):
-        message = _('conflicting option string(s): %s')
-        conflict_string = ', '.join([option_string
-                                     for option_string, action
-                                     in conflicting_actions])
+        message = _("conflicting option string(s): %s")
+        conflict_string = ", ".join(
+            [option_string for option_string, action in conflicting_actions]
+        )
         raise ArgumentError(action, message % conflict_string)
 
     def _handle_conflict_resolve(self, action, conflicting_actions):
@@ -1483,13 +1466,12 @@
 
 
 class _ArgumentGroup(_ActionsContainer):
-
     def __init__(self, container, title=None, description=None, **kwargs):
         # add any missing keyword arguments by checking the container
         update = kwargs.setdefault
-        update('conflict_handler', container.conflict_handler)
-        update('prefix_chars', container.prefix_chars)
-        update('argument_default', container.argument_default)
+        update("conflict_handler", container.conflict_handler)
+        update("prefix_chars", container.prefix_chars)
+        update("argument_default", container.argument_default)
         super_init = super(_ArgumentGroup, self).__init__
         super_init(description=description, **kwargs)
 
@@ -1502,8 +1484,7 @@
         self._actions = container._actions
         self._option_string_actions = container._option_string_actions
         self._defaults = container._defaults
-        self._has_negative_number_optionals = \
-            container._has_negative_number_optionals
+        self._has_negative_number_optionals = container._has_negative_number_optionals
 
     def _add_action(self, action):
         action = super(_ArgumentGroup, self)._add_action(action)
@@ -1516,7 +1497,6 @@
 
 
 class _MutuallyExclusiveGroup(_ArgumentGroup):
-
     def __init__(self, container, required=False):
         super(_MutuallyExclusiveGroup, self).__init__(container)
         self.required = required
@@ -1524,7 +1504,7 @@
 
     def _add_action(self, action):
         if action.required:
-            msg = _('mutually exclusive arguments must be optional')
+            msg = _("mutually exclusive arguments must be optional")
             raise ValueError(msg)
         action = self._container._add_action(action)
         self._group_actions.append(action)
@@ -1553,33 +1533,40 @@
         - add_help -- Add a -h/-help option
     """
 
-    def __init__(self,
-                 prog=None,
-                 usage=None,
-                 description=None,
-                 epilog=None,
-                 version=None,
-                 parents=[],
-                 formatter_class=HelpFormatter,
-                 prefix_chars='-',
-                 fromfile_prefix_chars=None,
-                 argument_default=None,
-                 conflict_handler='error',
-                 add_help=True):
+    def __init__(
+        self,
+        prog=None,
+        usage=None,
+        description=None,
+        epilog=None,
+        version=None,
+        parents=[],
+        formatter_class=HelpFormatter,
+        prefix_chars="-",
+        fromfile_prefix_chars=None,
+        argument_default=None,
+        conflict_handler="error",
+        add_help=True,
+    ):
 
         if version is not None:
             import warnings
+
             warnings.warn(
                 """The "version" argument to ArgumentParser is deprecated. """
                 """Please use """
                 """"add_argument(..., action='version', version="N", ...)" """
-                """instead""", DeprecationWarning)
+                """instead""",
+                DeprecationWarning,
+            )
 
         superinit = super(ArgumentParser, self).__init__
-        superinit(description=description,
-                  prefix_chars=prefix_chars,
-                  argument_default=argument_default,
-                  conflict_handler=conflict_handler)
+        superinit(
+            description=description,
+            prefix_chars=prefix_chars,
+            argument_default=argument_default,
+            conflict_handler=conflict_handler,
+        )
 
         # default setting for prog
         if prog is None:
@@ -1594,26 +1581,35 @@
         self.add_help = add_help
 
         add_group = self.add_argument_group
-        self._positionals = add_group(_('positional arguments'))
-        self._optionals = add_group(_('optional arguments'))
+        self._positionals = add_group(_("positional arguments"))
+        self._optionals = add_group(_("optional arguments"))
         self._subparsers = None
 
         # register types
         def identity(string):
             return string
-        self.register('type', None, identity)
+
+        self.register("type", None, identity)
 
         # add help and version arguments if necessary
         # (using explicit default to override global argument_default)
         if self.add_help:
             self.add_argument(
-                '-h', '--help', action='help', default=SUPPRESS,
-                help=_('show this help message and exit'))
+                "-h",
+                "--help",
+                action="help",
+                default=SUPPRESS,
+                help=_("show this help message and exit"),
+            )
         if self.version:
             self.add_argument(
-                '-v', '--version', action='version', default=SUPPRESS,
+                "-v",
+                "--version",
+                action="version",
+                default=SUPPRESS,
                 version=self.version,
-                help=_("show program's version number and exit"))
+                help=_("show program's version number and exit"),
+            )
 
         # add parent arguments and defaults
         for parent in parents:
@@ -1630,13 +1626,13 @@
     # =======================
     def _get_kwargs(self):
         names = [
-            'prog',
-            'usage',
-            'description',
-            'version',
-            'formatter_class',
-            'conflict_handler',
-            'add_help',
+            "prog",
+            "usage",
+            "description",
+            "version",
+            "formatter_class",
+            "conflict_handler",
+            "add_help",
         ]
         return [(name, getattr(self, name)) for name in names]
 
@@ -1645,29 +1641,29 @@
     # ==================================
     def add_subparsers(self, **kwargs):
         if self._subparsers is not None:
-            self.error(_('cannot have multiple subparser arguments'))
+            self.error(_("cannot have multiple subparser arguments"))
 
         # add the parser class to the arguments if it's not present
-        kwargs.setdefault('parser_class', type(self))
+        kwargs.setdefault("parser_class", type(self))
 
-        if 'title' in kwargs or 'description' in kwargs:
-            title = _(kwargs.pop('title', 'subcommands'))
-            description = _(kwargs.pop('description', None))
+        if "title" in kwargs or "description" in kwargs:
+            title = _(kwargs.pop("title", "subcommands"))
+            description = _(kwargs.pop("description", None))
             self._subparsers = self.add_argument_group(title, description)
         else:
             self._subparsers = self._positionals
 
         # prog defaults to the usage message of this parser, skipping
         # optional arguments and with no "usage:" prefix
-        if kwargs.get('prog') is None:
+        if kwargs.get("prog") is None:
             formatter = self._get_formatter()
             positionals = self._get_positional_actions()
             groups = self._mutually_exclusive_groups
-            formatter.add_usage(self.usage, positionals, groups, '')
-            kwargs['prog'] = formatter.format_help().strip()
+            formatter.add_usage(self.usage, positionals, groups, "")
+            kwargs["prog"] = formatter.format_help().strip()
 
         # create the parsers action and add it to the positionals list
-        parsers_class = self._pop_action_class(kwargs, 'parsers')
+        parsers_class = self._pop_action_class(kwargs, "parsers")
         action = parsers_class(option_strings=[], **kwargs)
         self._subparsers._add_action(action)
 
@@ -1682,14 +1678,10 @@
         return action
 
     def _get_optional_actions(self):
-        return [action
-                for action in self._actions
-                if action.option_strings]
+        return [action for action in self._actions if action.option_strings]
 
     def _get_positional_actions(self):
-        return [action
-                for action in self._actions
-                if not action.option_strings]
+        return [action for action in self._actions if not action.option_strings]
 
     # =====================================
     # Command line argument parsing methods
@@ -1697,8 +1689,8 @@
     def parse_args(self, args=None, namespace=None):
         args, argv = self.parse_known_args(args, namespace)
         if argv:
-            msg = _('unrecognized arguments: %s')
-            self.error(msg % ' '.join(argv))
+            msg = _("unrecognized arguments: %s")
+            self.error(msg % " ".join(argv))
         return args
 
     def parse_known_args(self, args=None, namespace=None):
@@ -1745,7 +1737,7 @@
             for i, mutex_action in enumerate(mutex_group._group_actions):
                 conflicts = action_conflicts.setdefault(mutex_action, [])
                 conflicts.extend(group_actions[:i])
-                conflicts.extend(group_actions[i + 1:])
+                conflicts.extend(group_actions[i + 1 :])
 
         # find all option indices, and determine the arg_string_pattern
         # which has an 'O' if there is an option at an index,
@@ -1756,24 +1748,24 @@
         for i, arg_string in enumerate(arg_strings_iter):
 
             # all args after -- are non-options
-            if arg_string == '--':
-                arg_string_pattern_parts.append('-')
+            if arg_string == "--":
+                arg_string_pattern_parts.append("-")
                 for arg_string in arg_strings_iter:
-                    arg_string_pattern_parts.append('A')
+                    arg_string_pattern_parts.append("A")
 
             # otherwise, add the arg to the arg strings
             # and note the index if it was an option
             else:
                 option_tuple = self._parse_optional(arg_string)
                 if option_tuple is None:
-                    pattern = 'A'
+                    pattern = "A"
                 else:
                     option_string_indices[i] = option_tuple
-                    pattern = 'O'
+                    pattern = "O"
                 arg_string_pattern_parts.append(pattern)
 
         # join the pieces together to form the pattern
-        arg_strings_pattern = ''.join(arg_string_pattern_parts)
+        arg_strings_pattern = "".join(arg_string_pattern_parts)
 
         # converts arg strings to the appropriate and then takes the action
         seen_actions = _set()
@@ -1790,7 +1782,7 @@
                 seen_non_default_actions.add(action)
                 for conflict_action in action_conflicts.get(action, []):
                     if conflict_action in seen_non_default_actions:
-                        msg = _('not allowed with argument %s')
+                        msg = _("not allowed with argument %s")
                         action_name = _get_action_name(conflict_action)
                         raise ArgumentError(action, msg % action_name)
 
@@ -1820,7 +1812,7 @@
                 # if there is an explicit argument, try to match the
                 # optional's string arguments to only this
                 if explicit_arg is not None:
-                    arg_count = match_argument(action, 'A')
+                    arg_count = match_argument(action, "A")
 
                     # if the action is a single-dash option and takes no
                     # arguments, try to parse more single-dash options out
@@ -1836,7 +1828,7 @@
                                 action = optionals_map[option_string]
                                 break
                         else:
-                            msg = _('ignored explicit argument %r')
+                            msg = _("ignored explicit argument %r")
                             raise ArgumentError(action, msg % explicit_arg)
 
                     # if the action expect exactly one argument, we've
@@ -1850,7 +1842,7 @@
                     # error if a double-dash option did not use the
                     # explicit argument
                     else:
-                        msg = _('ignored explicit argument %r')
+                        msg = _("ignored explicit argument %r")
                         raise ArgumentError(action, msg % explicit_arg)
 
                 # if there is no explicit argument, try to match the
@@ -1886,13 +1878,13 @@
             # slice off the appropriate arg strings for each Positional
             # and add the Positional and its args to the list
             for action, arg_count in zip(positionals, arg_counts):
-                args = arg_strings[start_index: start_index + arg_count]
+                args = arg_strings[start_index : start_index + arg_count]
                 start_index += arg_count
                 take_action(action, args)
 
             # slice off the Positionals that we just parsed and return the
             # index at which the Positionals' string args stopped
-            positionals[:] = positionals[len(arg_counts):]
+            positionals[:] = positionals[len(arg_counts) :]
             return start_index
 
         # consume Positionals and Optionals alternately, until we have
@@ -1906,10 +1898,9 @@
         while start_index <= max_option_string_index:
 
             # consume any Positionals preceding the next option
-            next_option_string_index = min([
-                index
-                for index in option_string_indices
-                if index >= start_index])
+            next_option_string_index = min(
+                [index for index in option_string_indices if index >= start_index]
+            )
             if start_index != next_option_string_index:
                 positionals_end_index = consume_positionals(start_index)
 
@@ -1940,14 +1931,14 @@
         # if we didn't use all the Positional objects, there were too few
         # arg strings supplied.
         if positionals:
-            self.error(_('too few arguments'))
+            self.error(_("too few arguments"))
 
         # make sure all required actions were present
         for action in self._actions:
             if action.required:
                 if action not in seen_actions:
                     name = _get_action_name(action)
-                    self.error(_('argument %s is required') % name)
+                    self.error(_("argument %s is required") % name)
 
         # make sure all required groups had one option present
         for group in self._mutually_exclusive_groups:
@@ -1958,11 +1949,13 @@
 
                 # if no actions were used, report the error
                 else:
-                    names = [_get_action_name(action)
-                             for action in group._group_actions
-                             if action.help is not SUPPRESS]
-                    msg = _('one of the arguments %s is required')
-                    self.error(msg % ' '.join(names))
+                    names = [
+                        _get_action_name(action)
+                        for action in group._group_actions
+                        if action.help is not SUPPRESS
+                    ]
+                    msg = _("one of the arguments %s is required")
+                    self.error(msg % " ".join(names))
 
         # return the updated namespace and the extra arguments
         return namespace, extras
@@ -2007,11 +2000,11 @@
         # raise an exception if we weren't able to find a match
         if match is None:
             nargs_errors = {
-                None: _('expected one argument'),
-                OPTIONAL: _('expected at most one argument'),
-                ONE_OR_MORE: _('expected at least one argument'),
+                None: _("expected one argument"),
+                OPTIONAL: _("expected at most one argument"),
+                ONE_OR_MORE: _("expected at least one argument"),
             }
-            default = _('expected %s argument(s)') % action.nargs
+            default = _("expected %s argument(s)") % action.nargs
             msg = nargs_errors.get(action.nargs, default)
             raise ArgumentError(action, msg)
 
@@ -2024,8 +2017,9 @@
         result = []
         for i in range(len(actions), 0, -1):
             actions_slice = actions[:i]
-            pattern = ''.join([self._get_nargs_pattern(action)
-                               for action in actions_slice])
+            pattern = "".join(
+                [self._get_nargs_pattern(action) for action in actions_slice]
+            )
             match = _re.match(pattern, arg_strings_pattern)
             if match is not None:
                 result.extend([len(string) for string in match.groups()])
@@ -2053,8 +2047,8 @@
             return None
 
         # if the option string before the "=" is present, return the action
-        if '=' in arg_string:
-            option_string, explicit_arg = arg_string.split('=', 1)
+        if "=" in arg_string:
+            option_string, explicit_arg = arg_string.split("=", 1)
             if option_string in self._option_string_actions:
                 action = self._option_string_actions[option_string]
                 return action, option_string, explicit_arg
@@ -2065,15 +2059,16 @@
 
         # if multiple actions match, the option string was ambiguous
         if len(option_tuples) > 1:
-            options = ', '.join([option_string
-                for action, option_string, explicit_arg in option_tuples])
+            options = ", ".join(
+                [option_string for action, option_string, explicit_arg in option_tuples]
+            )
             tup = arg_string, options
-            self.error(_('ambiguous option: %s could match %s') % tup)
+            self.error(_("ambiguous option: %s could match %s") % tup)
 
         # if exactly one action matched, this segmentation is good,
         # so return the parsed action
         elif len(option_tuples) == 1:
-            option_tuple, = option_tuples
+            (option_tuple,) = option_tuples
             return option_tuple
 
         # if it was not found as an option, but it looks like a negative
@@ -2084,7 +2079,7 @@
                 return None
 
         # if it contains a space, it was meant to be a positional
-        if ' ' in arg_string:
+        if " " in arg_string:
             return None
 
         # it was meant to be an optional but there is no such option
@@ -2098,8 +2093,8 @@
         # split at the '='
         chars = self.prefix_chars
         if option_string[0] in chars and option_string[1] in chars:
-            if '=' in option_string:
-                option_prefix, explicit_arg = option_string.split('=', 1)
+            if "=" in option_string:
+                option_prefix, explicit_arg = option_string.split("=", 1)
             else:
                 option_prefix = option_string
                 explicit_arg = None
@@ -2130,7 +2125,7 @@
 
         # shouldn't ever get here
         else:
-            self.error(_('unexpected option string: %s') % option_string)
+            self.error(_("unexpected option string: %s") % option_string)
 
         # return the collected option tuples
         return result
@@ -2142,36 +2137,36 @@
 
         # the default (None) is assumed to be a single argument
         if nargs is None:
-            nargs_pattern = '(-*A-*)'
+            nargs_pattern = "(-*A-*)"
 
         # allow zero or one arguments
         elif nargs == OPTIONAL:
-            nargs_pattern = '(-*A?-*)'
+            nargs_pattern = "(-*A?-*)"
 
         # allow zero or more arguments
         elif nargs == ZERO_OR_MORE:
-            nargs_pattern = '(-*[A-]*)'
+            nargs_pattern = "(-*[A-]*)"
 
         # allow one or more arguments
         elif nargs == ONE_OR_MORE:
-            nargs_pattern = '(-*A[A-]*)'
+            nargs_pattern = "(-*A[A-]*)"
 
         # allow any number of options or arguments
         elif nargs == REMAINDER:
-            nargs_pattern = '([-AO]*)'
+            nargs_pattern = "([-AO]*)"
 
         # allow one argument followed by any number of options or arguments
         elif nargs == PARSER:
-            nargs_pattern = '(-*A[-AO]*)'
+            nargs_pattern = "(-*A[-AO]*)"
 
         # all others should be integers
         else:
-            nargs_pattern = '(-*%s-*)' % '-*'.join('A' * nargs)
+            nargs_pattern = "(-*%s-*)" % "-*".join("A" * nargs)
 
         # if this is an optional action, -- is not allowed
         if action.option_strings:
-            nargs_pattern = nargs_pattern.replace('-*', '')
-            nargs_pattern = nargs_pattern.replace('-', '')
+            nargs_pattern = nargs_pattern.replace("-*", "")
+            nargs_pattern = nargs_pattern.replace("-", "")
 
         # return the pattern
         return nargs_pattern
@@ -2182,7 +2177,7 @@
     def _get_values(self, action, arg_strings):
         # for everything but PARSER args, strip out '--'
         if action.nargs not in [PARSER, REMAINDER]:
-            arg_strings = [s for s in arg_strings if s != '--']
+            arg_strings = [s for s in arg_strings if s != "--"]
 
         # optional argument produces a default when not present
         if not arg_strings and action.nargs == OPTIONAL:
@@ -2196,8 +2191,11 @@
 
         # when nargs='*' on a positional, if there were no command-line
         # args, use the default if it is anything other than None
-        elif (not arg_strings and action.nargs == ZERO_OR_MORE and
-              not action.option_strings):
+        elif (
+            not arg_strings
+            and action.nargs == ZERO_OR_MORE
+            and not action.option_strings
+        ):
             if action.default is not None:
                 value = action.default
             else:
@@ -2206,7 +2204,7 @@
 
         # single argument or optional argument produces a single value
         elif len(arg_strings) == 1 and action.nargs in [None, OPTIONAL]:
-            arg_string, = arg_strings
+            (arg_string,) = arg_strings
             value = self._get_value(action, arg_string)
             self._check_value(action, value)
 
@@ -2229,9 +2227,9 @@
         return value
 
     def _get_value(self, action, arg_string):
-        type_func = self._registry_get('type', action.type, action.type)
+        type_func = self._registry_get("type", action.type, action.type)
         if not _callable(type_func):
-            msg = _('%r is not callable')
+            msg = _("%r is not callable")
             raise ArgumentError(action, msg % type_func)
 
         # convert the value to the appropriate type
@@ -2240,14 +2238,14 @@
 
         # ArgumentTypeErrors indicate errors
         except ArgumentTypeError:
-            name = getattr(action.type, '__name__', repr(action.type))
+            name = getattr(action.type, "__name__", repr(action.type))
             msg = str(_sys.exc_info()[1])
             raise ArgumentError(action, msg)
 
         # TypeErrors or ValueErrors also indicate errors
         except (TypeError, ValueError):
-            name = getattr(action.type, '__name__', repr(action.type))
-            msg = _('invalid %s value: %r')
+            name = getattr(action.type, "__name__", repr(action.type))
+            msg = _("invalid %s value: %r")
             raise ArgumentError(action, msg % (name, arg_string))
 
         # return the converted value
@@ -2256,8 +2254,8 @@
     def _check_value(self, action, value):
         # converted value must be one of the choices (if specified)
         if action.choices is not None and value not in action.choices:
-            tup = value, ', '.join(map(repr, action.choices))
-            msg = _('invalid choice: %r (choose from %s)') % tup
+            tup = value, ", ".join(map(repr, action.choices))
+            msg = _("invalid choice: %r (choose from %s)") % tup
             raise ArgumentError(action, msg)
 
     # =======================
@@ -2265,16 +2263,14 @@
     # =======================
     def format_usage(self):
         formatter = self._get_formatter()
-        formatter.add_usage(self.usage, self._actions,
-                            self._mutually_exclusive_groups)
+        formatter.add_usage(self.usage, self._actions, self._mutually_exclusive_groups)
         return formatter.format_help()
 
     def format_help(self):
         formatter = self._get_formatter()
 
         # usage
-        formatter.add_usage(self.usage, self._actions,
-                            self._mutually_exclusive_groups)
+        formatter.add_usage(self.usage, self._actions, self._mutually_exclusive_groups)
 
         # description
         formatter.add_text(self.description)
@@ -2294,10 +2290,12 @@
 
     def format_version(self):
         import warnings
+
         warnings.warn(
             'The format_version method is deprecated -- the "version" '
-            'argument to ArgumentParser is no longer supported.',
-            DeprecationWarning)
+            "argument to ArgumentParser is no longer supported.",
+            DeprecationWarning,
+        )
         formatter = self._get_formatter()
         formatter.add_text(self.version)
         return formatter.format_help()
@@ -2320,10 +2318,12 @@
 
     def print_version(self, file=None):
         import warnings
+
         warnings.warn(
             'The print_version method is deprecated -- the "version" '
-            'argument to ArgumentParser is no longer supported.',
-            DeprecationWarning)
+            "argument to ArgumentParser is no longer supported.",
+            DeprecationWarning,
+        )
         self._print_message(self.format_version(), file)
 
     def _print_message(self, message, file=None):
@@ -2350,4 +2350,4 @@
         should either exit or raise an exception.
         """
         self.print_usage(_sys.stderr)
-        self.exit(2, _('%s: error: %s\n') % (self.prog, message))
+        self.exit(2, _("%s: error: %s\n") % (self.prog, message))
diff --git a/utils/pyscop/isl.py b/utils/pyscop/isl.py
index 0c8de2f..5eaf779 100644
--- a/utils/pyscop/isl.py
+++ b/utils/pyscop/isl.py
@@ -2,495 +2,485 @@
 
 isl = cdll.LoadLibrary("libisl.so")
 
+
 class Context:
-  defaultInstance = None
-  instances = {}
+    defaultInstance = None
+    instances = {}
 
-  def __init__(self):
-    ptr = isl.isl_ctx_alloc()
-    self.ptr = ptr
-    Context.instances[ptr] = self
+    def __init__(self):
+        ptr = isl.isl_ctx_alloc()
+        self.ptr = ptr
+        Context.instances[ptr] = self
 
-  def __del__(self):
-    isl.isl_ctx_free(self)
+    def __del__(self):
+        isl.isl_ctx_free(self)
 
-  def from_param(self):
-    return self.ptr
+    def from_param(self):
+        return self.ptr
 
-  @staticmethod
-  def from_ptr(ptr):
-    return Context.instances[ptr]
+    @staticmethod
+    def from_ptr(ptr):
+        return Context.instances[ptr]
 
-  @staticmethod
-  def getDefaultInstance():
-    if Context.defaultInstance == None:
-      Context.defaultInstance = Context()
+    @staticmethod
+    def getDefaultInstance():
+        if Context.defaultInstance == None:
+            Context.defaultInstance = Context()
 
-    return Context.defaultInstance
+        return Context.defaultInstance
+
 
 class IslObject:
-  def __init__(self, string = "", ctx = None, ptr = None):
-    self.initialize_isl_methods()
-    if ptr != None:
-      self.ptr = ptr
-      self.ctx = self.get_isl_method("get_ctx")(self)
-      return
+    def __init__(self, string="", ctx=None, ptr=None):
+        self.initialize_isl_methods()
+        if ptr != None:
+            self.ptr = ptr
+            self.ctx = self.get_isl_method("get_ctx")(self)
+            return
 
-    if ctx == None:
-      ctx = Context.getDefaultInstance()
+        if ctx == None:
+            ctx = Context.getDefaultInstance()
 
-    self.ctx = ctx
-    self.ptr = self.get_isl_method("read_from_str")(ctx, string, -1)
+        self.ctx = ctx
+        self.ptr = self.get_isl_method("read_from_str")(ctx, string, -1)
 
-  def __del__(self):
-    self.get_isl_method("free")(self)
+    def __del__(self):
+        self.get_isl_method("free")(self)
 
-  def from_param(self):
-    return self.ptr
+    def from_param(self):
+        return self.ptr
 
-  @property
-  def context(self):
-    return self.ctx
+    @property
+    def context(self):
+        return self.ctx
 
-  def __repr__(self):
-    p = Printer(self.ctx)
-    self.to_printer(p)
-    return p.getString();
+    def __repr__(self):
+        p = Printer(self.ctx)
+        self.to_printer(p)
+        return p.getString()
 
-  def __str__(self):
-    p = Printer(self.ctx)
-    self.to_printer(p)
-    return p.getString();
+    def __str__(self):
+        p = Printer(self.ctx)
+        self.to_printer(p)
+        return p.getString()
 
-  @staticmethod
-  def isl_name():
-    return "No isl name available"
+    @staticmethod
+    def isl_name():
+        return "No isl name available"
 
-  def initialize_isl_methods(self):
-    if hasattr(self.__class__, "initialized"):
-      return
+    def initialize_isl_methods(self):
+        if hasattr(self.__class__, "initialized"):
+            return
 
-    self.__class__.initalized = True
-    self.get_isl_method("read_from_str").argtypes = [Context, c_char_p, c_int]
-    self.get_isl_method("copy").argtypes = [self.__class__]
-    self.get_isl_method("copy").restype = c_int
-    self.get_isl_method("free").argtypes = [self.__class__]
-    self.get_isl_method("get_ctx").argtypes = [self.__class__]
-    self.get_isl_method("get_ctx").restype = Context.from_ptr 
-    getattr(isl, "isl_printer_print_" + self.isl_name()).argtypes = [Printer, self.__class__]
+        self.__class__.initalized = True
+        self.get_isl_method("read_from_str").argtypes = [Context, c_char_p, c_int]
+        self.get_isl_method("copy").argtypes = [self.__class__]
+        self.get_isl_method("copy").restype = c_int
+        self.get_isl_method("free").argtypes = [self.__class__]
+        self.get_isl_method("get_ctx").argtypes = [self.__class__]
+        self.get_isl_method("get_ctx").restype = Context.from_ptr
+        getattr(isl, "isl_printer_print_" + self.isl_name()).argtypes = [
+            Printer,
+            self.__class__,
+        ]
 
-  def get_isl_method(self, name):
-    return getattr(isl, "isl_" + self.isl_name() + "_" + name)
+    def get_isl_method(self, name):
+        return getattr(isl, "isl_" + self.isl_name() + "_" + name)
 
-  def to_printer(self, printer):
-    getattr(isl, "isl_printer_print_" + self.isl_name())(printer, self)
+    def to_printer(self, printer):
+        getattr(isl, "isl_printer_print_" + self.isl_name())(printer, self)
+
 
 class BSet(IslObject):
-  @staticmethod
-  def from_ptr(ptr):
-    if not ptr:
-      return
-    return BSet(ptr = ptr)
+    @staticmethod
+    def from_ptr(ptr):
+        if not ptr:
+            return
+        return BSet(ptr=ptr)
 
-  @staticmethod
-  def isl_name():
-    return "basic_set"
+    @staticmethod
+    def isl_name():
+        return "basic_set"
+
 
 class Set(IslObject):
-  @staticmethod
-  def from_ptr(ptr):
-    if not ptr:
-      return
-    return Set(ptr = ptr)
+    @staticmethod
+    def from_ptr(ptr):
+        if not ptr:
+            return
+        return Set(ptr=ptr)
 
-  @staticmethod
-  def isl_name():
-    return "set"
+    @staticmethod
+    def isl_name():
+        return "set"
+
 
 class USet(IslObject):
-  @staticmethod
-  def from_ptr(ptr):
-    if not ptr:
-      return
-    return USet(ptr = ptr)
+    @staticmethod
+    def from_ptr(ptr):
+        if not ptr:
+            return
+        return USet(ptr=ptr)
 
-  @staticmethod
-  def isl_name():
-    return "union_set"
+    @staticmethod
+    def isl_name():
+        return "union_set"
 
 
 class BMap(IslObject):
-  @staticmethod
-  def from_ptr(ptr):
-    if not ptr:
-      return
-    return BMap(ptr = ptr)
+    @staticmethod
+    def from_ptr(ptr):
+        if not ptr:
+            return
+        return BMap(ptr=ptr)
 
-  def __mul__(self, set):
-    return self.intersect_domain(set)
+    def __mul__(self, set):
+        return self.intersect_domain(set)
 
-  @staticmethod
-  def isl_name():
-    return "basic_map"
+    @staticmethod
+    def isl_name():
+        return "basic_map"
+
 
 class Map(IslObject):
-  @staticmethod
-  def from_ptr(ptr):
-    if not ptr:
-      return
-    return Map(ptr = ptr)
+    @staticmethod
+    def from_ptr(ptr):
+        if not ptr:
+            return
+        return Map(ptr=ptr)
 
-  def __mul__(self, set):
-    return self.intersect_domain(set)
+    def __mul__(self, set):
+        return self.intersect_domain(set)
 
-  @staticmethod
-  def isl_name():
-    return "map"
+    @staticmethod
+    def isl_name():
+        return "map"
 
-  @staticmethod
-  def lex_lt(dim):
-    dim = isl.isl_dim_copy(dim)
-    return isl.isl_map_lex_lt(dim)
+    @staticmethod
+    def lex_lt(dim):
+        dim = isl.isl_dim_copy(dim)
+        return isl.isl_map_lex_lt(dim)
 
-  @staticmethod
-  def lex_le(dim):
-    dim = isl.isl_dim_copy(dim)
-    return isl.isl_map_lex_le(dim)
+    @staticmethod
+    def lex_le(dim):
+        dim = isl.isl_dim_copy(dim)
+        return isl.isl_map_lex_le(dim)
 
-  @staticmethod
-  def lex_gt(dim):
-    dim = isl.isl_dim_copy(dim)
-    return isl.isl_map_lex_gt(dim)
+    @staticmethod
+    def lex_gt(dim):
+        dim = isl.isl_dim_copy(dim)
+        return isl.isl_map_lex_gt(dim)
 
-  @staticmethod
-  def lex_ge(dim):
-    dim = isl.isl_dim_copy(dim)
-    return isl.isl_map_lex_ge(dim)
+    @staticmethod
+    def lex_ge(dim):
+        dim = isl.isl_dim_copy(dim)
+        return isl.isl_map_lex_ge(dim)
+
 
 class UMap(IslObject):
-  @staticmethod
-  def from_ptr(ptr):
-    if not ptr:
-      return
-    return UMap(ptr = ptr)
+    @staticmethod
+    def from_ptr(ptr):
+        if not ptr:
+            return
+        return UMap(ptr=ptr)
 
-  @staticmethod
-  def isl_name():
-    return "union_map"
+    @staticmethod
+    def isl_name():
+        return "union_map"
+
 
 class Dim(IslObject):
-  @staticmethod
-  def from_ptr(ptr):
-    if not ptr:
-      return
-    return Dim(ptr = ptr)
+    @staticmethod
+    def from_ptr(ptr):
+        if not ptr:
+            return
+        return Dim(ptr=ptr)
 
-  @staticmethod
-  def isl_name():
-    return "dim"
+    @staticmethod
+    def isl_name():
+        return "dim"
 
-  def initialize_isl_methods(self):
-    if hasattr(self.__class__, "initialized"):
-      return
+    def initialize_isl_methods(self):
+        if hasattr(self.__class__, "initialized"):
+            return
 
-    self.__class__.initalized = True
-    self.get_isl_method("copy").argtypes = [self.__class__]
-    self.get_isl_method("copy").restype = c_int
-    self.get_isl_method("free").argtypes = [self.__class__]
-    self.get_isl_method("get_ctx").argtypes = [self.__class__]
-    self.get_isl_method("get_ctx").restype = Context.from_ptr 
+        self.__class__.initalized = True
+        self.get_isl_method("copy").argtypes = [self.__class__]
+        self.get_isl_method("copy").restype = c_int
+        self.get_isl_method("free").argtypes = [self.__class__]
+        self.get_isl_method("get_ctx").argtypes = [self.__class__]
+        self.get_isl_method("get_ctx").restype = Context.from_ptr
 
-  def __repr__(self):
-    return str(self)
+    def __repr__(self):
+        return str(self)
 
-  def __str__(self):
+    def __str__(self):
 
-    dimParam = isl.isl_dim_size(self, 1)
-    dimIn = isl.isl_dim_size(self, 2)
-    dimOut = isl.isl_dim_size(self, 3)
+        dimParam = isl.isl_dim_size(self, 1)
+        dimIn = isl.isl_dim_size(self, 2)
+        dimOut = isl.isl_dim_size(self, 3)
 
-    if dimIn:
-      return "<dim In:%s, Out:%s, Param:%s>" % (dimIn, dimOut, dimParam)
+        if dimIn:
+            return "<dim In:%s, Out:%s, Param:%s>" % (dimIn, dimOut, dimParam)
 
-    return "<dim Set:%s, Param:%s>" % (dimOut, dimParam)
+        return "<dim Set:%s, Param:%s>" % (dimOut, dimParam)
+
 
 class Printer:
-  FORMAT_ISL = 0
-  FORMAT_POLYLIB = 1
-  FORMAT_POLYLIB_CONSTRAINTS = 2
-  FORMAT_OMEGA = 3
-  FORMAT_C = 4
-  FORMAT_LATEX = 5
-  FORMAT_EXT_POLYLIB = 6
+    FORMAT_ISL = 0
+    FORMAT_POLYLIB = 1
+    FORMAT_POLYLIB_CONSTRAINTS = 2
+    FORMAT_OMEGA = 3
+    FORMAT_C = 4
+    FORMAT_LATEX = 5
+    FORMAT_EXT_POLYLIB = 6
 
-  def __init__(self, ctx = None):
-    if ctx == None:
-      ctx = Context.getDefaultInstance()
+    def __init__(self, ctx=None):
+        if ctx == None:
+            ctx = Context.getDefaultInstance()
 
-    self.ctx = ctx
-    self.ptr = isl.isl_printer_to_str(ctx)
+        self.ctx = ctx
+        self.ptr = isl.isl_printer_to_str(ctx)
 
-  def setFormat(self, format):
-    self.ptr = isl.isl_printer_set_output_format(self, format);
+    def setFormat(self, format):
+        self.ptr = isl.isl_printer_set_output_format(self, format)
 
-  def from_param(self):
-    return self.ptr
+    def from_param(self):
+        return self.ptr
 
-  def __del__(self):
-    isl.isl_printer_free(self)
+    def __del__(self):
+        isl.isl_printer_free(self)
 
-  def getString(self):
-    return isl.isl_printer_get_str(self)
+    def getString(self):
+        return isl.isl_printer_get_str(self)
+
 
 functions = [
-             # Unary properties
-             ("is_empty", BSet, [BSet], c_int),
-             ("is_empty", Set, [Set], c_int),
-             ("is_empty", USet, [USet], c_int),
-             ("is_empty", BMap, [BMap], c_int),
-             ("is_empty", Map, [Map], c_int),
-             ("is_empty", UMap, [UMap], c_int),
-
+    # Unary properties
+    ("is_empty", BSet, [BSet], c_int),
+    ("is_empty", Set, [Set], c_int),
+    ("is_empty", USet, [USet], c_int),
+    ("is_empty", BMap, [BMap], c_int),
+    ("is_empty", Map, [Map], c_int),
+    ("is_empty", UMap, [UMap], c_int),
     #         ("is_universe", Set, [Set], c_int),
     #         ("is_universe", Map, [Map], c_int),
-
-             ("is_single_valued", Map, [Map], c_int),
-
-             ("is_bijective", Map, [Map], c_int),
-
-             ("is_wrapping", BSet, [BSet], c_int),
-             ("is_wrapping", Set, [Set], c_int),
-
-             # Binary properties
-             ("is_equal", BSet, [BSet, BSet], c_int),
-             ("is_equal", Set, [Set, Set], c_int),
-             ("is_equal", USet, [USet, USet], c_int),
-             ("is_equal", BMap, [BMap, BMap], c_int),
-             ("is_equal", Map, [Map, Map], c_int),
-             ("is_equal", UMap, [UMap, UMap], c_int),
-
-             # is_disjoint missing
-
-             # ("is_subset", BSet, [BSet, BSet], c_int),
-             ("is_subset", Set, [Set, Set], c_int),
-             ("is_subset", USet, [USet, USet], c_int),
-             ("is_subset", BMap, [BMap, BMap], c_int),
-             ("is_subset", Map, [Map, Map], c_int),
-             ("is_subset", UMap, [UMap, UMap], c_int),
-             #("is_strict_subset", BSet, [BSet, BSet], c_int),
-             ("is_strict_subset", Set, [Set, Set], c_int),
-             ("is_strict_subset", USet, [USet, USet], c_int),
-             ("is_strict_subset", BMap, [BMap, BMap], c_int),
-             ("is_strict_subset", Map, [Map, Map], c_int),
-             ("is_strict_subset", UMap, [UMap, UMap], c_int),
-
-             # Unary Operations
-             ("complement", Set, [Set], Set),
-             ("reverse", BMap, [BMap], BMap),
-             ("reverse", Map, [Map], Map),
-             ("reverse", UMap, [UMap], UMap),
-
-             # Projection missing
-             ("range", BMap, [BMap], BSet),
-             ("range", Map, [Map], Set),
-             ("range", UMap, [UMap], USet),
-             ("domain", BMap, [BMap], BSet),
-             ("domain", Map, [Map], Set),
-             ("domain", UMap, [UMap], USet),
-
-             ("identity", Set, [Set], Map),
-             ("identity", USet, [USet], UMap),
-
-             ("deltas", BMap, [BMap], BSet),
-             ("deltas", Map, [Map], Set),
-             ("deltas", UMap, [UMap], USet),
-
-             ("coalesce", Set, [Set], Set),
-             ("coalesce", USet, [USet], USet),
-             ("coalesce", Map, [Map], Map),
-             ("coalesce", UMap, [UMap], UMap),
-
-             ("detect_equalities", BSet, [BSet], BSet),
-             ("detect_equalities", Set, [Set], Set),
-             ("detect_equalities", USet, [USet], USet),
-             ("detect_equalities", BMap, [BMap], BMap),
-             ("detect_equalities", Map, [Map], Map),
-             ("detect_equalities", UMap, [UMap], UMap),
-
-             ("convex_hull", Set, [Set], Set),
-             ("convex_hull", Map, [Map], Map),
-
-             ("simple_hull", Set, [Set], Set),
-             ("simple_hull", Map, [Map], Map),
-
-             ("affine_hull", BSet, [BSet], BSet),
-             ("affine_hull", Set, [Set], BSet),
-             ("affine_hull", USet, [USet], USet),
-             ("affine_hull", BMap, [BMap], BMap),
-             ("affine_hull", Map, [Map], BMap),
-             ("affine_hull", UMap, [UMap], UMap),
-
-             ("polyhedral_hull", Set, [Set], Set),
-             ("polyhedral_hull", USet, [USet], USet),
-             ("polyhedral_hull", Map, [Map], Map),
-             ("polyhedral_hull", UMap, [UMap], UMap),
-
-             # Power missing
-             # Transitive closure missing
-             # Reaching path lengths missing
-
-             ("wrap", BMap, [BMap], BSet),
-             ("wrap", Map, [Map], Set),
-             ("wrap", UMap, [UMap], USet),
-             ("unwrap", BSet, [BMap], BMap),
-             ("unwrap", Set, [Map], Map),
-             ("unwrap", USet, [UMap], UMap),
-
-             ("flatten", Set, [Set], Set),
-             ("flatten", Map, [Map], Map),
-             ("flatten_map", Set, [Set], Map),
-
-             # Dimension manipulation missing
-
-             # Binary Operations
-             ("intersect", BSet, [BSet, BSet], BSet),
-             ("intersect", Set, [Set, Set], Set),
-             ("intersect", USet, [USet, USet], USet),
-             ("intersect", BMap, [BMap, BMap], BMap),
-             ("intersect", Map, [Map, Map], Map),
-             ("intersect", UMap, [UMap, UMap], UMap),
-             ("intersect_domain", BMap, [BMap, BSet], BMap),
-             ("intersect_domain", Map, [Map, Set], Map),
-             ("intersect_domain", UMap, [UMap, USet], UMap),
-             ("intersect_range", BMap, [BMap, BSet], BMap),
-             ("intersect_range", Map, [Map, Set], Map),
-             ("intersect_range", UMap, [UMap, USet], UMap),
-
-             ("union", BSet, [BSet, BSet], Set),
-             ("union", Set, [Set, Set], Set),
-             ("union", USet, [USet, USet], USet),
-             ("union", BMap, [BMap, BMap], Map),
-             ("union", Map, [Map, Map], Map),
-             ("union", UMap, [UMap, UMap], UMap),
-
-             ("subtract", Set, [Set, Set], Set),
-             ("subtract", Map, [Map, Map], Map),
-             ("subtract", USet, [USet, USet], USet),
-             ("subtract", UMap, [UMap, UMap], UMap),
-
-             ("apply", BSet, [BSet, BMap], BSet),
-             ("apply", Set, [Set, Map], Set),
-             ("apply", USet, [USet, UMap], USet),
-             ("apply_domain", BMap, [BMap, BMap], BMap),
-             ("apply_domain", Map, [Map, Map], Map),
-             ("apply_domain", UMap, [UMap, UMap], UMap),
-             ("apply_range", BMap, [BMap, BMap], BMap),
-             ("apply_range", Map, [Map, Map], Map),
-             ("apply_range", UMap, [UMap, UMap], UMap),
-
-             ("gist", BSet, [BSet, BSet], BSet),
-             ("gist", Set, [Set, Set], Set),
-             ("gist", USet, [USet, USet], USet),
-             ("gist", BMap, [BMap, BMap], BMap),
-             ("gist", Map, [Map, Map], Map),
-             ("gist", UMap, [UMap, UMap], UMap),
-
-             # Lexicographic Optimizations
-             # partial_lexmin missing
-             ("lexmin", BSet, [BSet], BSet),
-             ("lexmin", Set, [Set], Set),
-             ("lexmin", USet, [USet], USet),
-             ("lexmin", BMap, [BMap], BMap),
-             ("lexmin", Map, [Map], Map),
-             ("lexmin", UMap, [UMap], UMap),
-
-             ("lexmax", BSet, [BSet], BSet),
-             ("lexmax", Set, [Set], Set),
-             ("lexmax", USet, [USet], USet),
-             ("lexmax", BMap, [BMap], BMap),
-             ("lexmax", Map, [Map], Map),
-             ("lexmax", UMap, [UMap], UMap),
-
-              # Undocumented
-             ("lex_lt_union_set", USet, [USet, USet], UMap),
-             ("lex_le_union_set", USet, [USet, USet], UMap),
-             ("lex_gt_union_set", USet, [USet, USet], UMap),
-             ("lex_ge_union_set", USet, [USet, USet], UMap),
-
-             ]
+    ("is_single_valued", Map, [Map], c_int),
+    ("is_bijective", Map, [Map], c_int),
+    ("is_wrapping", BSet, [BSet], c_int),
+    ("is_wrapping", Set, [Set], c_int),
+    # Binary properties
+    ("is_equal", BSet, [BSet, BSet], c_int),
+    ("is_equal", Set, [Set, Set], c_int),
+    ("is_equal", USet, [USet, USet], c_int),
+    ("is_equal", BMap, [BMap, BMap], c_int),
+    ("is_equal", Map, [Map, Map], c_int),
+    ("is_equal", UMap, [UMap, UMap], c_int),
+    # is_disjoint missing
+    # ("is_subset", BSet, [BSet, BSet], c_int),
+    ("is_subset", Set, [Set, Set], c_int),
+    ("is_subset", USet, [USet, USet], c_int),
+    ("is_subset", BMap, [BMap, BMap], c_int),
+    ("is_subset", Map, [Map, Map], c_int),
+    ("is_subset", UMap, [UMap, UMap], c_int),
+    # ("is_strict_subset", BSet, [BSet, BSet], c_int),
+    ("is_strict_subset", Set, [Set, Set], c_int),
+    ("is_strict_subset", USet, [USet, USet], c_int),
+    ("is_strict_subset", BMap, [BMap, BMap], c_int),
+    ("is_strict_subset", Map, [Map, Map], c_int),
+    ("is_strict_subset", UMap, [UMap, UMap], c_int),
+    # Unary Operations
+    ("complement", Set, [Set], Set),
+    ("reverse", BMap, [BMap], BMap),
+    ("reverse", Map, [Map], Map),
+    ("reverse", UMap, [UMap], UMap),
+    # Projection missing
+    ("range", BMap, [BMap], BSet),
+    ("range", Map, [Map], Set),
+    ("range", UMap, [UMap], USet),
+    ("domain", BMap, [BMap], BSet),
+    ("domain", Map, [Map], Set),
+    ("domain", UMap, [UMap], USet),
+    ("identity", Set, [Set], Map),
+    ("identity", USet, [USet], UMap),
+    ("deltas", BMap, [BMap], BSet),
+    ("deltas", Map, [Map], Set),
+    ("deltas", UMap, [UMap], USet),
+    ("coalesce", Set, [Set], Set),
+    ("coalesce", USet, [USet], USet),
+    ("coalesce", Map, [Map], Map),
+    ("coalesce", UMap, [UMap], UMap),
+    ("detect_equalities", BSet, [BSet], BSet),
+    ("detect_equalities", Set, [Set], Set),
+    ("detect_equalities", USet, [USet], USet),
+    ("detect_equalities", BMap, [BMap], BMap),
+    ("detect_equalities", Map, [Map], Map),
+    ("detect_equalities", UMap, [UMap], UMap),
+    ("convex_hull", Set, [Set], Set),
+    ("convex_hull", Map, [Map], Map),
+    ("simple_hull", Set, [Set], Set),
+    ("simple_hull", Map, [Map], Map),
+    ("affine_hull", BSet, [BSet], BSet),
+    ("affine_hull", Set, [Set], BSet),
+    ("affine_hull", USet, [USet], USet),
+    ("affine_hull", BMap, [BMap], BMap),
+    ("affine_hull", Map, [Map], BMap),
+    ("affine_hull", UMap, [UMap], UMap),
+    ("polyhedral_hull", Set, [Set], Set),
+    ("polyhedral_hull", USet, [USet], USet),
+    ("polyhedral_hull", Map, [Map], Map),
+    ("polyhedral_hull", UMap, [UMap], UMap),
+    # Power missing
+    # Transitive closure missing
+    # Reaching path lengths missing
+    ("wrap", BMap, [BMap], BSet),
+    ("wrap", Map, [Map], Set),
+    ("wrap", UMap, [UMap], USet),
+    ("unwrap", BSet, [BMap], BMap),
+    ("unwrap", Set, [Map], Map),
+    ("unwrap", USet, [UMap], UMap),
+    ("flatten", Set, [Set], Set),
+    ("flatten", Map, [Map], Map),
+    ("flatten_map", Set, [Set], Map),
+    # Dimension manipulation missing
+    # Binary Operations
+    ("intersect", BSet, [BSet, BSet], BSet),
+    ("intersect", Set, [Set, Set], Set),
+    ("intersect", USet, [USet, USet], USet),
+    ("intersect", BMap, [BMap, BMap], BMap),
+    ("intersect", Map, [Map, Map], Map),
+    ("intersect", UMap, [UMap, UMap], UMap),
+    ("intersect_domain", BMap, [BMap, BSet], BMap),
+    ("intersect_domain", Map, [Map, Set], Map),
+    ("intersect_domain", UMap, [UMap, USet], UMap),
+    ("intersect_range", BMap, [BMap, BSet], BMap),
+    ("intersect_range", Map, [Map, Set], Map),
+    ("intersect_range", UMap, [UMap, USet], UMap),
+    ("union", BSet, [BSet, BSet], Set),
+    ("union", Set, [Set, Set], Set),
+    ("union", USet, [USet, USet], USet),
+    ("union", BMap, [BMap, BMap], Map),
+    ("union", Map, [Map, Map], Map),
+    ("union", UMap, [UMap, UMap], UMap),
+    ("subtract", Set, [Set, Set], Set),
+    ("subtract", Map, [Map, Map], Map),
+    ("subtract", USet, [USet, USet], USet),
+    ("subtract", UMap, [UMap, UMap], UMap),
+    ("apply", BSet, [BSet, BMap], BSet),
+    ("apply", Set, [Set, Map], Set),
+    ("apply", USet, [USet, UMap], USet),
+    ("apply_domain", BMap, [BMap, BMap], BMap),
+    ("apply_domain", Map, [Map, Map], Map),
+    ("apply_domain", UMap, [UMap, UMap], UMap),
+    ("apply_range", BMap, [BMap, BMap], BMap),
+    ("apply_range", Map, [Map, Map], Map),
+    ("apply_range", UMap, [UMap, UMap], UMap),
+    ("gist", BSet, [BSet, BSet], BSet),
+    ("gist", Set, [Set, Set], Set),
+    ("gist", USet, [USet, USet], USet),
+    ("gist", BMap, [BMap, BMap], BMap),
+    ("gist", Map, [Map, Map], Map),
+    ("gist", UMap, [UMap, UMap], UMap),
+    # Lexicographic Optimizations
+    # partial_lexmin missing
+    ("lexmin", BSet, [BSet], BSet),
+    ("lexmin", Set, [Set], Set),
+    ("lexmin", USet, [USet], USet),
+    ("lexmin", BMap, [BMap], BMap),
+    ("lexmin", Map, [Map], Map),
+    ("lexmin", UMap, [UMap], UMap),
+    ("lexmax", BSet, [BSet], BSet),
+    ("lexmax", Set, [Set], Set),
+    ("lexmax", USet, [USet], USet),
+    ("lexmax", BMap, [BMap], BMap),
+    ("lexmax", Map, [Map], Map),
+    ("lexmax", UMap, [UMap], UMap),
+    # Undocumented
+    ("lex_lt_union_set", USet, [USet, USet], UMap),
+    ("lex_le_union_set", USet, [USet, USet], UMap),
+    ("lex_gt_union_set", USet, [USet, USet], UMap),
+    ("lex_ge_union_set", USet, [USet, USet], UMap),
+]
 keep_functions = [
-             # Unary properties
-             ("get_dim", BSet, [BSet], Dim),
-             ("get_dim", Set, [Set], Dim),
-             ("get_dim", USet, [USet], Dim),
-             ("get_dim", BMap, [BMap], Dim),
-             ("get_dim", Map, [Map], Dim),
-             ("get_dim", UMap, [UMap], Dim)
-             ]
+    # Unary properties
+    ("get_dim", BSet, [BSet], Dim),
+    ("get_dim", Set, [Set], Dim),
+    ("get_dim", USet, [USet], Dim),
+    ("get_dim", BMap, [BMap], Dim),
+    ("get_dim", Map, [Map], Dim),
+    ("get_dim", UMap, [UMap], Dim),
+]
+
 
 def addIslFunction(object, name):
     functionName = "isl_" + object.isl_name() + "_" + name
     islFunction = getattr(isl, functionName)
     if len(islFunction.argtypes) == 1:
-      f = lambda a: islFunctionOneOp(islFunction, a)
+        f = lambda a: islFunctionOneOp(islFunction, a)
     elif len(islFunction.argtypes) == 2:
-      f = lambda a, b: islFunctionTwoOp(islFunction, a, b)
+        f = lambda a, b: islFunctionTwoOp(islFunction, a, b)
     object.__dict__[name] = f
 
 
 def islFunctionOneOp(islFunction, ops):
-  ops = getattr(isl, "isl_" + ops.isl_name() + "_copy")(ops)
-  return islFunction(ops)
+    ops = getattr(isl, "isl_" + ops.isl_name() + "_copy")(ops)
+    return islFunction(ops)
+
 
 def islFunctionTwoOp(islFunction, opOne, opTwo):
-  opOne = getattr(isl, "isl_" + opOne.isl_name() + "_copy")(opOne)
-  opTwo = getattr(isl, "isl_" + opTwo.isl_name() + "_copy")(opTwo)
-  return islFunction(opOne, opTwo)
+    opOne = getattr(isl, "isl_" + opOne.isl_name() + "_copy")(opOne)
+    opTwo = getattr(isl, "isl_" + opTwo.isl_name() + "_copy")(opTwo)
+    return islFunction(opOne, opTwo)
+
 
 for (operation, base, operands, ret) in functions:
-  functionName = "isl_" + base.isl_name() + "_" + operation
-  islFunction = getattr(isl, functionName)
-  if len(operands) == 1:
-    islFunction.argtypes = [c_int]
-  elif len(operands) == 2:
-    islFunction.argtypes = [c_int, c_int]
+    functionName = "isl_" + base.isl_name() + "_" + operation
+    islFunction = getattr(isl, functionName)
+    if len(operands) == 1:
+        islFunction.argtypes = [c_int]
+    elif len(operands) == 2:
+        islFunction.argtypes = [c_int, c_int]
 
-  if ret == c_int:
-    islFunction.restype = ret
-  else:
-    islFunction.restype = ret.from_ptr
+    if ret == c_int:
+        islFunction.restype = ret
+    else:
+        islFunction.restype = ret.from_ptr
 
-  addIslFunction(base, operation)
+    addIslFunction(base, operation)
+
 
 def addIslFunctionKeep(object, name):
     functionName = "isl_" + object.isl_name() + "_" + name
     islFunction = getattr(isl, functionName)
     if len(islFunction.argtypes) == 1:
-      f = lambda a: islFunctionOneOpKeep(islFunction, a)
+        f = lambda a: islFunctionOneOpKeep(islFunction, a)
     elif len(islFunction.argtypes) == 2:
-      f = lambda a, b: islFunctionTwoOpKeep(islFunction, a, b)
+        f = lambda a, b: islFunctionTwoOpKeep(islFunction, a, b)
     object.__dict__[name] = f
 
+
 def islFunctionOneOpKeep(islFunction, ops):
-  return islFunction(ops)
+    return islFunction(ops)
+
 
 def islFunctionTwoOpKeep(islFunction, opOne, opTwo):
-  return islFunction(opOne, opTwo)
+    return islFunction(opOne, opTwo)
+
 
 for (operation, base, operands, ret) in keep_functions:
-  functionName = "isl_" + base.isl_name() + "_" + operation
-  islFunction = getattr(isl, functionName)
-  if len(operands) == 1:
-    islFunction.argtypes = [c_int]
-  elif len(operands) == 2:
-    islFunction.argtypes = [c_int, c_int]
+    functionName = "isl_" + base.isl_name() + "_" + operation
+    islFunction = getattr(isl, functionName)
+    if len(operands) == 1:
+        islFunction.argtypes = [c_int]
+    elif len(operands) == 2:
+        islFunction.argtypes = [c_int, c_int]
 
-  if ret == c_int:
-    islFunction.restype = ret
-  else:
-    islFunction.restype = ret.from_ptr
+    if ret == c_int:
+        islFunction.restype = ret
+    else:
+        islFunction.restype = ret.from_ptr
 
-  addIslFunctionKeep(base, operation)
+    addIslFunctionKeep(base, operation)
 
 isl.isl_ctx_free.argtypes = [Context]
 isl.isl_basic_set_read_from_str.argtypes = [Context, c_char_p, c_int]
@@ -554,25 +544,44 @@
 isl.isl_map_lex_ge.argtypes = [c_int]
 isl.isl_map_lex_ge.restype = Map.from_ptr
 
-isl.isl_union_map_compute_flow.argtypes = [c_int, c_int, c_int, c_int, c_void_p,
-                                           c_void_p, c_void_p, c_void_p]
+isl.isl_union_map_compute_flow.argtypes = [
+    c_int,
+    c_int,
+    c_int,
+    c_int,
+    c_void_p,
+    c_void_p,
+    c_void_p,
+    c_void_p,
+]
+
 
 def dependences(sink, must_source, may_source, schedule):
-  sink = getattr(isl, "isl_" + sink.isl_name() + "_copy")(sink)
-  must_source = getattr(isl, "isl_" + must_source.isl_name() + "_copy")(must_source)
-  may_source = getattr(isl, "isl_" + may_source.isl_name() + "_copy")(may_source)
-  schedule = getattr(isl, "isl_" + schedule.isl_name() + "_copy")(schedule)
-  must_dep = c_int()
-  may_dep = c_int()
-  must_no_source = c_int()
-  may_no_source = c_int()
-  isl.isl_union_map_compute_flow(sink, must_source, may_source, schedule, \
-                                 byref(must_dep), byref(may_dep),
-                                 byref(must_no_source),
-                                 byref(may_no_source))
+    sink = getattr(isl, "isl_" + sink.isl_name() + "_copy")(sink)
+    must_source = getattr(isl, "isl_" + must_source.isl_name() + "_copy")(must_source)
+    may_source = getattr(isl, "isl_" + may_source.isl_name() + "_copy")(may_source)
+    schedule = getattr(isl, "isl_" + schedule.isl_name() + "_copy")(schedule)
+    must_dep = c_int()
+    may_dep = c_int()
+    must_no_source = c_int()
+    may_no_source = c_int()
+    isl.isl_union_map_compute_flow(
+        sink,
+        must_source,
+        may_source,
+        schedule,
+        byref(must_dep),
+        byref(may_dep),
+        byref(must_no_source),
+        byref(may_no_source),
+    )
 
-  return (UMap.from_ptr(must_dep), UMap.from_ptr(may_dep), \
-          USet.from_ptr(must_no_source), USet.from_ptr(may_no_source))
+    return (
+        UMap.from_ptr(must_dep),
+        UMap.from_ptr(may_dep),
+        USet.from_ptr(must_no_source),
+        USet.from_ptr(may_no_source),
+    )
 
 
-__all__ = ['Set', 'Map', 'Printer', 'Context']
+__all__ = ["Set", "Map", "Printer", "Context"]
diff --git a/utils/pyscop/pyscop.py b/utils/pyscop/pyscop.py
index a7c3481..382e23d 100644
--- a/utils/pyscop/pyscop.py
+++ b/utils/pyscop/pyscop.py
@@ -1,49 +1,52 @@
 import json
 from isl import *
 
+
 class Scop:
-  def __init__(self, filename):
-    f = open(filename, 'r')
-    self.json = json.load(f)
-    return
+    def __init__(self, filename):
+        f = open(filename, "r")
+        self.json = json.load(f)
+        return
 
-  def __str__(self):
-    return json.dumps(self.json, indent=2)
+    def __str__(self):
+        return json.dumps(self.json, indent=2)
 
-  def __repr__(self):
-    return str(self)
+    def __repr__(self):
+        return str(self)
 
-  @property
-  def statements(self):
-    return self.json['statements']
+    @property
+    def statements(self):
+        return self.json["statements"]
+
 
 class Transforms:
-  """
-  Create a map that interchanges two dimensions 'A' and 'B'
+    """
+    Create a map that interchanges two dimensions 'A' and 'B'
 
-  numberDimensions: The overall number of dimensions
-  dimensionA: The dimension of dimension 'A'
-  dimensionB: The dimension of dimension 'B'
+    numberDimensions: The overall number of dimensions
+    dimensionA: The dimension of dimension 'A'
+    dimensionB: The dimension of dimension 'B'
 
-  getInterchange(2, 0, 1):
-  {[d0, d1] -> [d1, d0]}
-  """
-  @staticmethod
-  def getInterchange(numberDimensions, dimensionA, dimensionB):
+    getInterchange(2, 0, 1):
+    {[d0, d1] -> [d1, d0]}
+    """
 
-    dims = ['d' + str(i) for i in range(numberDimensions)]
-    dimString = ",".join(dims)
+    @staticmethod
+    def getInterchange(numberDimensions, dimensionA, dimensionB):
 
-    changedDims = dims
-    first = dims[dimensionA]
-    second = dims[dimensionB]
-    changedDims[dimensionA] = second
-    changedDims[dimensionB] = first
-    changedDimString = ",".join(changedDims)
+        dims = ["d" + str(i) for i in range(numberDimensions)]
+        dimString = ",".join(dims)
 
-    return Map("{[%s] -> [%s]}" % (dimString, changedDimString))
+        changedDims = dims
+        first = dims[dimensionA]
+        second = dims[dimensionB]
+        changedDims[dimensionA] = second
+        changedDims[dimensionB] = first
+        changedDimString = ",".join(changedDims)
 
-  """
+        return Map("{[%s] -> [%s]}" % (dimString, changedDimString))
+
+    """
   Create a map that strip mines one dimension
 
   numberDimensions: The overall number of dimensions
@@ -53,16 +56,22 @@
   getStripMine(2, 1, 64):
   {[d0, d1] -> [d0, o, d1] : o % 64 = 0 and o <= d1 <= d1 + 63}
   """
-  @staticmethod
-  def getStripMine(numberDimensions, stripMineDim, factor):
 
-    dims = ['d' + str(i) for i in range(numberDimensions)]
-    dimString = ",".join(dims)
+    @staticmethod
+    def getStripMine(numberDimensions, stripMineDim, factor):
 
-    changedDims = dims
-    smd = dims[stripMineDim]
-    changedDims[stripMineDim] = "o,%s" % smd
-    changedDimString = ",".join(changedDims)
-    string = "{[%s] -> [%s]: o %% %i = 0 and o <= %s <= o + %i}" % \
-          (dimString, changedDimString, factor, smd, factor - 1)
-    return Map(string)
+        dims = ["d" + str(i) for i in range(numberDimensions)]
+        dimString = ",".join(dims)
+
+        changedDims = dims
+        smd = dims[stripMineDim]
+        changedDims[stripMineDim] = "o,%s" % smd
+        changedDimString = ",".join(changedDims)
+        string = "{[%s] -> [%s]: o %% %i = 0 and o <= %s <= o + %i}" % (
+            dimString,
+            changedDimString,
+            factor,
+            smd,
+            factor - 1,
+        )
+        return Map(string)