code: def new_maven_client(base_url, repo, is_snapshot=False, username=None, password=None):
      
  
      session = requests.Session()
      if username is not None and password is not None:
          session.auth = (username, password)
  
      config = GenericArtifactoryClientConfig()
      config.is_integration = is_snapshot
      config.http_dao = stac.http.VersionApiDao(session, base_url, repo)
      config.url_generator = MavenArtifactUrlGenerator(base_url, repo)
  
      return GenericArtifactoryClient(config)
docs: Get a new implementation of :class:`ArtifactoryClient` for use with Maven repository
      layouts, optionally using the provided authentication.
  
      Most users will simply call this method to get a new Maven client instance. For example:
  
      >>> client = new_maven_client('https://www.example.com/artifactory', 'libs-release')
      >>> latest = client.get_latest_version('com.example.users.service', 'war')
      '1.6.0'
  
      :param str base_url: URL to root of the Artifactory installation. Example,
          "https://artifactory.example.com/artifactory".
      :param str repo: Which repository should searches be done against. Example, "libs-release-local"
          or "libs-snapshot-local".
      :param bool is_snapshot: Does the repository to perform searches against contain SNAPSHOT
          (a.k.a. integration) versions? Default is ``False``
      :param str username: Optional username for authentication when making API calls and
          downloading artifacts.
      :param str password: Optional password for authentication when making API calls and
          downloading artifacts.
      :return: New Artifactory client for use with Maven repositories
      :rtype: GenericArtifactoryClient