code: def parse_model(self, model):
          
          # TODO if model is empty, use $JUJU_MODEL environment variable.
          if model and ':' in model:
              # explicit controller given
              controller_name, model_name = model.split(':')
          else:
              # use the current controller if one isn't explicitly given
              controller_name = self.current_controller()
              model_name = model
          if not controller_name:
              controller_name = self.current_controller()
          if not model_name:
              model_name = self.current_model(controller_name, model_only=True)
              if not model_name:
                  raise NoModelException('no current model')
  
          if '/' not in model_name:
              # model name doesn't include a user prefix, so add one
              # by using the current user for the controller.
              accounts = self.accounts().get(controller_name)
              if accounts is None:
                  raise JujuError('No account found for controller {} '.format(controller_name))
              username = accounts.get('user')
              if username is None:
                  raise JujuError('No username found for controller {}'.format(controller_name))
              model_name = username + "/" + model_name
  
          return controller_name, model_name
docs: Split the given model_name into controller and model parts.
          If the controller part is empty, the current controller will be used.
          If the model part is empty, the current model will be used for
          the controller.
          The returned model name will always be qualified with a username.
          :param model str: The model name to parse.
          :return (str, str): The controller and model names.