<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def held(self, sname):
 """ Determines whether a button is currently held, identifying it by standard name :param sname: The standard name of the button :return: None if the button is not held down, or is not available, otherwise the number of seconds as a floating point value since it was pressed """

        state = self.buttons_by_sname.get(sname)
        if state is not None:
            if state.is_pressed and state.last_pressed is not None:
                return time() - state.last_pressed
        return None