<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _gate_height(self, gate):
 """ Return the height to use for this gate. :param string gate: The name of the gate whose height is desired. :return: Height of the gate. :rtype: float """

        try:
            height = self.settings['gates'][gate.__class__.__name__]['height']
        except KeyError:
            height = .5
        return height