<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def UpsertStoredProcedure(self, collection_link, sproc, options=None):
 """Upserts a stored procedure in a collection. :param str collection_link: The link to the document collection. :param str sproc: :param dict options: The request options for the request. :return: The upserted Stored Procedure. :rtype: dict """

        if options is None:
            options = {}

        collection_id, path, sproc = self._GetContainerIdWithPathForSproc(collection_link, sproc)
        return self.Upsert(sproc,
                           path,
                           'sprocs',
                           collection_id,
                           None,
                           options)