code: def _load_idp_dynamic_entity_id(self, state):
          
          # Change the idp entity id dynamically
          idp_config_file = copy.deepcopy(self.idp_config)
          idp_config_file["entityid"] = "{}/{}".format(self.idp_config["entityid"], state[self.name]["target_entity_id"])
          idp_config = IdPConfig().load(idp_config_file, metadata_construction=False)
          return Server(config=idp_config)
docs: Loads an idp server with the entity id saved in state
  
          :type state: satosa.state.State
          :rtype: saml.server.Server
  
          :param state: The current state
          :return: An idp server