<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def required_types(self):
 """Set of names of types which the Command depends on. """

        required_types = set(x.type for x in self.params)
        required_types.add(self.type)
        required_types.discard(None)
        return required_types