code: def current_model(self, controller_name=None, model_only=False):
          '''Return the current model, qualified by its controller name.
          If controller_name is specified, the current model for
          that controller will be returned.
  
          If model_only is true, only the model name, not qualified by
          its controller name, will be returned.
          '''
          # TODO respect JUJU_MODEL environment variable.
          if not controller_name:
              controller_name = self.current_controller()
          if not controller_name:
              raise JujuError('No current controller')
          models = self.models()[controller_name]
          if 'current-model' not in models:
              return None
          if model_only:
              return models['current-model']
          return controller_name + ':' + models['current-model'f current_model(self, controller_name=None, model_only=False):
          '''Return the current model, qualified by its controller name.
          If controller_name is specified, the current model for
          that controller will be returned.
  
          If model_only is true, only the model name, not qualified by
          its controller name, will be returned.
          '''
          # TODO respect JUJU_MODEL environment variable.
          if not controller_name:
              controller_name = self.current_controller()
          if not controller_name:
              raise JujuError('No current controller')
          models = self.models()[controller_name]
          if 'current-model' not in models:
              return None
          if model_only:
              return models['current-model']
          return controller_name + ':' + models['current-model']
docs: Return the current model, qualified by its controller name.
          If controller_name is specified, the current model for
          that controller will be returned.
  
          If model_only is true, only the model name, not qualified by
          its controller name, will be returned.