def METHOD_NAME(self, ctx):
    from msrest.serialization import Deserializer
    from msrest.exceptions import DeserializationError
    datetime_str = ctx.getText().strip()
    try:
        self.parameters['ignore_data_before'] = Deserializer.deserialize_iso(datetime_str)
    except DeserializationError:
        message = "Datetime {} is not a valid ISO-8601 format"
        raise ValueError(message.format(datetime_str))