def __call__(self, text):
        """
        Ensure that the text is one of the valid choices, and return
        its corresponding value.
        """

        if text not in self.argmap:
            raise ValueError("unrecognized value %r" % text)

        return self.argmap[text]
def __call__ ( self , text ) : if text not in self . argmap : raise ValueError ( "unrecognized value %r" % text ) return self . argmap [ text ]
Ensure that the text is one of the valid choices, and return
        its corresponding value.