<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _take(d, key, default=None):
 """ If the key is present in dictionary, remove it and return it's value. If it is not present, return None. """

    if key in d:
        cmd = d[key]
        del d[key]
        return cmd
    else:
        return default