original_docstring: 
      Get a list of drives using WMI
      :return: list of drives
      
docstring: Get a list of drives using WMI
docstring_tokens: Get a list of drives using WMI
code: def list_rem_drives() -> List[Drive]:
      """
      Get a list of drives using WMI
      :return: list of drives
      """
      proc = subprocess.run(
          args=[
              'powershell',
              '-noprofile',
              '-command',
              'Get-WmiObject -Class Win32_LogicalDisk | Select-Object deviceid,volumename,drivetype | ConvertTo-Json'
          ],
          text=True,
          stdout=subprocess.PIPE
      )
      if proc.returncode != 0 or not proc.stdout.strip():
          print('Failed to enumerate drives')
          return []
      devices = json.loads(proc.stdout)
  
      drive_types = {
          0: 'Unknown',
          1: 'No Root Directory',
          2: 'Removable Disk',
          3: 'Local Disk',
          4: 'Network Drive',
          5: 'Compact Disc',
          6: 'RAM Disk',
      }
  
      drives = [Drive(
          letter=d['deviceid'],
          label=d['volumename'],
          drive_type=drive_types[d['drivetype']]
      ) for d in devices]
      res=[]
      for drive in drives:
          if drive.is_removable:
              res.append(drive)
      return res
code_tokens: def list_rem_drives ( ) -> List [ Drive ] : proc = subprocess . run ( args = [ 'powershell' , '-noprofile' , '-command' , 'Get-WmiObject -Class Win32_LogicalDisk | Select-Object deviceid,volumename,drivetype | ConvertTo-Json' ] , text = True , stdout = subprocess . PIPE ) if proc . returncode != 0 or not proc . stdout . strip ( ) : print ( 'Failed to enumerate drives' ) return [ ] devices = json . loads ( proc . stdout ) drive_types = { 0 : 'Unknown' , 1 : 'No Root Directory' , 2 : 'Removable Disk' , 3 : 'Local Disk' , 4 : 'Network Drive' , 5 : 'Compact Disc' , 6 : 'RAM Disk' , } drives = [ Drive ( letter = d [ 'deviceid' ] , label = d [ 'volumename' ] , drive_type = drive_types [ d [ 'drivetype' ] ] ) for d in devices ] res = [ ] for drive in drives : if drive . is_removable : res . append ( drive ) return res
short_docstring: Get a list of drives using WMI
short_docstring_tokens: Get a list of drives using WMI
comment: """
      Get a list of drives using WMI
      :return: list of drives
      """