<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def network_protocol(self, layer: Optional[Layer] = None) -> str: """Get a random network protocol form OSI model. :param layer: Enum object Layer. :return: Protocol name. :Example: AMQP """

        key = self._validate_enum(item=layer, enum=Layer)
        protocols = NETWORK_PROTOCOLS[key]
        return self.random.choice(protocols)