<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def magic_api(word):

 """
 This is our magic API that we're simulating.
 It'll return a random number and a cache timer.
 
 """

    result = sum(ord(x)-65 + randint(1,50) for x in word)
    delta = timedelta(seconds=result)
    cached_until = datetime.now() + delta
    return result, cached_until