code: def __init__(
      self,
      api_url,
      username=None,
      password=None,
      project=None,
      asset_path="",
      cache_path="",
  ):
      self.api_url = api_url
      self.xnat_session = requests.sessions.session()
      self.auth = (
          HTTPBasicAuth(username, password) if username else None
      )
      self.xnat_csrf = ""
      self._login_xnat()
  
      self.projects = project.split(",") if project else []
      self.projects = {p.strip() for p in self.projects}
      self.asset_path = asset_path
  
      uri_hash = md5_digest(api_url)
      cache_path = cache_path.strip() if cache_path else ""
      self.cache_path = (
          os.path.join(cache_path, uri_hash)
          if cache_path
          else os.path.join(
              pathlib.Path.home(),
              ".cache",
              "monailabel",
              "xnat",
              uri_hash,
          )
      )
  
      logger.info(f"XNAT:: API URL: {api_url}")
      logger.info(f"XNAT:: UserName: {username}")
      logger.info(
          f"XNAT:: Password: {'*' * len(password) if password else ''}"
      )
      logger.info(f"XNAT:: Project: {project}")
      logger.info(f"XNAT:: AssetPath: {asset_path}")
  
imports: import io
  import logging
  import os
  import pathlib
  import shutil
  import time
  from typing import Any, Dict, List, Optional
  from urllib.parse import quote_plus
  from xml.etree import ElementTree
  import requests
  from requests.auth import HTTPBasicAuth
  from monailabel.datastore.utils.convert import nifti_to_dicom_seg
  from monailabel.interfaces.datastore import Datastore
  from monailabel.utils.others.generic import md5_digest
label_desc: Use image node_id 1 to create a new XNATDatastore object from inherited base classes: Datastore with example: obj = XNATDatastore(api_url, username, password, project, asset_path, cache_path)