docs: def delete(self, record_key):
  
          ''' a method to delete a file
  
          :param record_key: string with name of file
          :return: string reporting outcome
          '''
  
          title = '%s.delete' % self.__class__.__name__
  
      # validate inputs
          input_fields = {
              'record_key': record_key
          }
          for key, value in input_fields.items():
              object_title = '%s(%s=%s)' % (title, key, str(value))
              self.fields.validate(value, '.%s' % key, object_title)
  
      # validate existence of file
          file_id, parent_id = self._get_id(record_key)
          if not file_id:
              exit_msg = '%s does not exist.' % record_key
              return exit_msg
              
      # remove file
          try:
              self.drive.delete(fileId=file_id).execute()
          except:
              raise DriveConnectionError(title)
  
      # determine file directory
          current_dir = os.path.split(record_key)[0]
          
      # remove empty parent folders
          try:
              while current_dir:
                  folder_id, parent_id = self._get_id(current_dir)
                  count = 0
                  for id, name, mimetype in self._list_directory(folder_id):
                      count += 1
                      break
                  if count:
                      self.drive.delete(fileId=folder_id).execute()
                      current_dir = os.path.split(current_dir)[0]
                  else:
                      break
          except:
              raise DriveConnectionError(title)
  
      # return exit message
          exit_msg = '%s has been deleted.' % record_key
          return exit_msg