code: def remove_folder(self, folder, recurse=False, force=False, **kwargs):
          
          api_method = dxpy.api.container_remove_folder
          if isinstance(self, DXProject):
              api_method = dxpy.api.project_remove_folder
  
          completed = False
          while not completed:
              resp = api_method(self._dxid,
                                {"folder": folder, "recurse": recurse, "force": force, "partial": True},
                                always_retry=force,  # api call is idempotent under 'force' semantics
                                **kwargs)
              if 'completed' not in resp:
                  raise DXError('Error removing folder')
              completed = resp['completed']
docs: :param folder: Full path to the folder to remove
          :type folder: string
          :param recurse: If True, recursively remove all objects and subfolders in the folder
          :type recurse: bool
          :param force: If True, will suppress errors for folders that do not exist
          :type force: bool
  
          Removes the specified folder from the project or container. It
          must be empty to be removed, unless *recurse* is True.
  
          Removal propagates to any hidden objects that become unreachable
          from any visible object in the same project or container as a
          result of this operation. (This can only happen if *recurse* is
          True.)