code: def coerce(self, value):
          
          if isinstance(value, int) or isinstance(value, compat.long):
  
              return value
  
          return int(value)
docs: Convert text values into integer values.
  
          Args:
              value (str or int): The value to coerce.
  
          Raises:
              TypeError: If the value is not an int or string.
              ValueError: If the value is not int or an acceptable value.
  
          Returns:
              int: The integer value represented.