<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(cont, path=None, profile=None):
    '''
    Delete a container, or delete an object from a container.

    CLI Example to delete a container::

        salt myminion swift.delete mycontainer

    CLI Example to delete an object from a container::

        salt myminion swift.delete mycontainer remoteobject
    '''
    swift_conn = _auth(profile)

    if path is None:
        return swift_conn.delete_container(cont)
    else:
        return swift_conn.delete_object(cont, path)