code: public function setConfiguration($configuration, $configure = true)
      {
          if (!$configuration instanceof ConfigurationInterface) {
              $configuration = new Configuration($configuration);
          }
  
          unset($this->configuration); // destroy the old one
  
          $this->configuration = $configuration;
  
          if ($configure) {
              $this->configure();
          }
      }
docs: This method will configure the object with the provided configuration.
  
  @param mixed $configuration
  @param boolean $configure
  
  @return void