code: def _normalize(value):
          
          if hasattr(value, 'value'):
              value = value.value
          if value is not None:
              value = long(value)
          return value
docs: Normalize handle values.