code: def deploy_raiden_contracts(
              self,
              max_num_of_token_networks: Optional[int],
      ) -> DeployedContracts:
          
  
          deployed_contracts: DeployedContracts = {
              'contracts_version': self.contract_version_string(),
              'chain_id': int(self.web3.version.network),
              'contracts': {},
          }
  
          self._deploy_and_remember(CONTRACT_ENDPOINT_REGISTRY, [], deployed_contracts)
          secret_registry = self._deploy_and_remember(
              contract_name=CONTRACT_SECRET_REGISTRY,
              arguments=[],
              deployed_contracts=deployed_contracts,
          )
          token_network_registry_args = [
              secret_registry.address,
              deployed_contracts['chain_id'],
              DEPLOY_SETTLE_TIMEOUT_MIN,
              DEPLOY_SETTLE_TIMEOUT_MAX,
          ]
          if max_num_of_token_networks:
              token_network_registry_args.append(max_num_of_token_networks)
          self._deploy_and_remember(
              contract_name=CONTRACT_TOKEN_NETWORK_REGISTRY,
              arguments=token_network_registry_args,
              deployed_contracts=deployed_contracts,
          )
  
          return deployed_contracts
docs: Deploy all required raiden contracts and return a dict of contract_name:address
  
          Args:
              max_num_of_token_networks (Optional[int]): The max number of tokens that can be
              registered to the TokenNetworkRegistry. If None, the argument is omitted from
              the call to the constructor of TokenNetworkRegistry.