<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def any2mb(s):
 """Convert string or number to memory in megabytes."""

    if is_string(s):
        return int(Memory.from_string(s).to("Mb"))
    else:
        return int(s)