Use the conditional to decide if you want to use the returned object or not. If you do not use it GC will take care of it.
if condition: returned = my_func(*args,**kwargs) # use the returned object to back up the dict else: my_func(*args,**kwargs) # the function returns an object but since there is not a reference to it, it will be GCed