docs: def parse(self, version):
          """
          Splits a typical version string (e.g. <MAJOR>.<MINOR>.<MICRO>)
          into a tuple that can be sorted properly. Ignores all leading
          and trailing characters by using a regex search (instead of match) so
          as to pick the version string out of a block of text.
  
          Parameters
          ----------
          version : str | int | float | tuple(int)
              The string containing the version numbers, or alternatively an
              integer, float (number after decimal is interpreted as minor ver),
              or tuple|list containing the version sequence.
  
          Returns
          -------
          sequence : tuple(int | str)
              A tuple containing the main sequence of the version,
              e.g. <MAJOR>.<MINOR>.<MICRO>
          prerelease : 2-tuple(str, int) | None
              A 2-tuple containing the type of prerelease ('a' - alpha,
              'b' - beta, or 'rc' - release-canditate) and the number of the
              prerelease
          post : int |None
              The number of the post version
          dev : int | None
              The number of the development version
          """
          # Check to see if version is not a string but rather another type
          # that can be interpreted as a version
          if isinstance(version, int):
              return (version,), None, None, None
          elif isinstance(version, (tuple, list)):
              return tuple(int(i) for i in version), None, None, None
          elif isinstance(version, float):
              major = math.floor(version)
              minor = version - major
              return (major, minor), None, None, None
          match = self.regex.search(version)
          if match is None:
              raise ArcanaVersionNotDetectableError(
                  "Could not parse version string {} as {}. Regex ({}) did not "
                  "match any sub-string".format(version, type(self).__name__,
                                                self.regex.pattern))
          sequence = []
          prerelease = None
          dev = None
          post = None
          for part in match.group(1).split(self.delimeter):
              if part.startswith('dev'):
                  dev = int(part[len('dev'):])
              elif part.startswith('post'):
                  post = int(part[len('post'):])
              else:
                  # Split on non-numeric parts of the version string so that we
                  # can detect prerelease
                  sub_parts = re.split('([^\d]+)', part)
                  if sub_parts[0]:
                      try:
                          seq_part = int(sub_parts[0])
                      except ValueError:
                          seq_part = sub_parts[0]
                      sequence.append(seq_part)
                  if len(sub_parts) > 1:
                      stage = sub_parts[1]
                      try:
                          pr_ver = int(sub_parts[2])
                      except ValueError:
                          raise ArcanaVersionNotDetectableError(
                              "Could not parse version string {} as {}. "
                              "Did not recognise pre-release version {}"
                              .format(version, type(self).__name__,
                                      sub_parts[2]))
                      stage = stage.strip('-_').lower()
                      if not stage:  # No prerelease info, assume a dev version
                          assert dev is None
                          dev = pr_ver
                          continue
                      if 'alpha'.startswith(stage):
                          stage = 'a'
                      elif 'beta'.startswith(stage):
                          stage = 'b'
                      elif stage == 'rc' or stage == 'release-canditate':
                          stage = 'rc'
                      else:
                          raise ArcanaVersionNotDetectableError(
                              "Could not parse version string {} as {}. "
                              "Did not recognise pre-release stage {}"
                              .format(version, type(self).__name__, stage))
                      prerelease = (stage, pr_ver)
          return tuple(sequence), prerelease, post, dev