<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, collector_id=None):
 """Delete a collector from inventory. Args: collector_id (int):
 id of collector (optional) """

        cid = self.collector_id

        if collector_id:
            cid = collector_id

        # param to delete id
        url = '{0}/{1}'.format(self.url, cid)
        request = requests.delete(url, auth=self.auth)
        try:
            # unable to delete collector
            response = request.json()
        except ValueError:
            # returns when collector is deleted
            # apparently, the request does not return
            # a json response
            response = {
                u'message': u'The request completed successfully.',
                u'status': 200,
            }
        return response