<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _normalize(value):
 """ Normalize handle values. """

        if hasattr(value, 'value'):
            value = value.value
        if value is not None:
            value = long(value)
        return value