code: def get_contracts_deployment_info(
          chain_id: int,
          version: Optional[str] = None,
          module: DeploymentModule = DeploymentModule.ALL,
  ) -> Optional[DeployedContracts]:
      
      if module not in DeploymentModule:
          raise ValueError(f'Unknown module {module} given to get_contracts_deployment_info()')
  
      def module_chosen(to_be_added: DeploymentModule):
          return module == to_be_added or module == DeploymentModule.ALL
  
      files: List[Path] = []
  
      if module_chosen(DeploymentModule.RAIDEN):
          files.append(contracts_deployed_path(
              chain_id=chain_id,
              version=version,
              services=False,
          ))
  
      if module == DeploymentModule.SERVICES and not version_provides_services(version):
          raise ValueError(
              f'SERVICES module queried for version {version}, but {version} '
              'does not provide service contracts.',
          )
  
      if module_chosen(DeploymentModule.SERVICES) and version_provides_services(version):
          files.append(contracts_deployed_path(
              chain_id=chain_id,
              version=version,
              services=True,
          ))
  
      deployment_data: DeployedContracts = {}  # type: ignore
  
      for f in files:
          deployment_data = merge_deployment_data(
              deployment_data,
              _load_json_from_path(f),
          )
  
      if not deployment_data:
          deployment_data = None
      return deployment_data
docs: Reads the deployment data. Returns None if the file is not found.
  
      Parameter:
          module The name of the module. ALL means deployed contracts from all modules that are
          available for the version.