code: def UpsertUserDefinedFunction(self, collection_link, udf, options=None):
          
          if options is None:
              options = {}
  
          collection_id, path, udf = self._GetContainerIdWithPathForUDF(collection_link, udf)
          return self.Upsert(udf,
                             path,
                             'udfs',
                             collection_id,
                             None,
                             options)
docs: Upserts a user defined function in a collection.
  
          :param str collection_link:
              The link to the collection.
          :param str udf:
          :param dict options:
              The request options for the request.
  
          :return:
              The upserted UDF.
          :rtype:
              dict