def copy(self):
        copy = JunctionTree(self.edges())
        copy.add_nodes_from(self.nodes())
        if self.factors:
            factors_copy = [factor.copy() for factor in self.factors]
            copy.add_factors(*factors_copy)
        return copy
Initialize an entity component.
dataset/ETHPy150Open pgmpy/pgmpy/pgmpy/models/JunctionTree.py/JunctionTree.copy--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/helpers/entity_component.py/EntityComponent.__init__