code: def get_major_version(version, remove=None):
      
      if remove:
          warnings.warn("remove argument is deprecated", DeprecationWarning)
      version_split = version.split(".")
      return version_split[0]
docs: Return major version of a provided version string. Major version is the
      first component of the dot-separated version string. For non-version-like
      strings this function returns the argument unchanged.
  
      The ``remove`` parameter is deprecated since version 1.18 and will be
      removed in the future.
  
      :param version: Version string
      :type version: str
      :rtype: str