def __init__(self,
                 config=None,
                 provider_name=None,
                 network_timeout=60 * 10,
                 **kwargs):
        self._network_timeout = network_timeout
        self.provider_config = config
        # Load the provider configuration
        if self.provider_config and not isinstance(self.provider_config, ParselmouthConfig):
            raise ParselmouthException(
                "Invalid config.  Config should be of type ParselmouthConfig",
            )
        elif not self.provider_config:
            self.provider_config = ParselmouthConfig(provider_name, **kwargs)

        # Get interface for given provider
        self.provider_name = self.provider_config.provider_name
        provider_interface_class = self.get_ad_service_interface_for_provider(
            self.provider_name
        )

        self.provider = provider_interface_class(
            **self.provider_config.get_credentials_arguments()
        )
        self.tree_builder = TreeBuilder(
            self.provider_name,
            self.provider,
        )

        # Attempt to access the network to check proper configuration
        try:
            self.get_network_timezone()
        except Exception as e:
            raise ParselmouthException(
                "Provider not configured correctly. Got error: '{}'".format(
                    str(e)
                )
            )
Constructor
dataset/ETHPy150Open chartbeat-labs/parselmouth/parselmouth/base.py/Parselmouth.__init__