<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getParameterByType(self, type):
 """Searchs a parameter by type and returns it."""

        result = None
        for parameter in self.getParameters():
            typeParam = parameter.getType()
            if typeParam == type:
                result = parameter
                break
        return result