code: def majorMinorVersion(sparkVersion):
          
          m = re.search(r'^(\d+)\.(\d+)(\..*)?$', sparkVersion)
          if m is not None:
              return (int(m.group(1)), int(m.group(2)))
          else:
              raise ValueError("Spark tried to parse '%s' as a Spark" % sparkVersion +
                               " version string, but it could not find the major and minor" +
                               " version numbers.")
docs: Given a Spark version string, return the (major version number, minor version number).
          E.g., for 2.0.1-SNAPSHOT, return (2, 0).
  
          >>> sparkVersion = "2.4.0"
          >>> VersionUtils.majorMinorVersion(sparkVersion)
          (2, 4)
          >>> sparkVersion = "2.3.0-SNAPSHOT"
          >>> VersionUtils.majorMinorVersion(sparkVersion)
          (2, 3)