<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def isConnected(self, fromName, toName):
 """ Are these two layers connected this way? """

        for c in self.connections:
            if (c.fromLayer.name == fromName and
                c.toLayer.name == toName):
                return 1
        return 0