<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check(self):
 """Check if it is a valid RADL document."""


        for i in [f for fs in [self.networks, self.ansible_hosts, self.systems, self.deploys,
                               self.configures, [self.contextualize]] for f in fs]:
            i.check(self)

        snames = [s.name for s in self.systems]
        if len(set(snames)) != len(snames):
            raise RADLParseException("Some System name duplicated.")

        nids = [s.id for s in self.networks]
        if len(set(nids)) != len(nids):
            raise RADLParseException("Some Network name duplicated.")

        return True