code: def ReplaceAttachment(self, attachment_link, attachment, options=None):
          
          if options is None:
              options = {}
  
          CosmosClient.__ValidateResource(attachment)
          path = base.GetPathFromLink(attachment_link)
          attachment_id = base.GetResourceIdOrFullNameFromLink(attachment_link)
          return self.Replace(attachment,
                              path,
                              'attachments',
                              attachment_id,
                              None,
                              options)
docs: Replaces an attachment and returns it.
  
          :param str attachment_link:
              The link to the attachment.
          :param dict attachment:
          :param dict options:
              The request options for the request.
  
          :return:
              The replaced Attachment
          :rtype:
              dict