<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, filename):
 """Delete a package or script from the distribution server. This method simply finds the Package or Script object from the database with the API GET call and then deletes it. This will remove the file from the database blob. For setups which have file share distribution points, you will need to delete the files on the shares also. Args: filename: Filename (no path) to delete. """

        if is_package(filename):
            self.connection["jss"].Package(filename).delete()
        else:
            self.connection["jss"].Script(filename).delete()