<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete(self, delete_contents=False):
 """Issues a request to delete the dataset. Args: delete_contents: if True, any tables and views in the dataset will be deleted. If False and the dataset is non-empty an exception will be raised. Returns: None on success. Raises: Exception if the delete fails (including if table was nonexistent). """

    if not self.exists():
      raise Exception('Cannot delete non-existent dataset %s' % self._full_name)
    try:
      self._api.datasets_delete(self._name_parts, delete_contents=delete_contents)
    except Exception as e:
      raise e
    self._info = None
    return None