docs: def collect_local_data(self, profile=None, profile_source=None):
          '''
          Collects master system data.
          :return:
          '''
          def call(func, *args, **kwargs):
              '''
              Call wrapper for templates
              :param func:
              :return:
              '''
              return self._extract_return(self._local_call({'fun': func, 'arg': args, 'kwarg': kwargs}))
  
          def run(func, *args, **kwargs):
              '''
              Runner wrapper for templates
              :param func:
              :return:
              '''
              return self._extract_return(self._local_run({'fun': func, 'arg': args, 'kwarg': kwargs}))
  
          scenario = profile_source or salt.cli.support.get_profile(profile or self.config['support_profile'], call, run)
          for category_name in scenario:
              self.out.put(category_name)
              self.collector.add(category_name)
              for action in scenario[category_name]:
                  if not action:
                      continue
                  action_name = next(iter(action))
                  if not isinstance(action[action_name], six.string_types):
                      info, output, conf = self._get_action(action)
                      action_type = self._get_action_type(action)  # run:<something> for runners
                      if action_type == self.RUNNER_TYPE:
                          self.out.put('Running {}'.format(info.lower()), indent=2)
                          self.collector.write(info, self._local_run(conf), output=output)
                      elif action_type == self.CALL_TYPE:
                          if not conf.get('salt.int.intfunc'):
                              self.out.put('Collecting {}'.format(info.lower()), indent=2)
                              self.collector.write(info, self._local_call(conf), output=output)
                          else:
                              self.collector.discard_current()
                              self._internal_function_call(conf)
                      else:
                          self.out.error('Unknown action type "{}" for action: {}'.format(action_type, action))
                  else:
                      # TODO: This needs to be moved then to the utils.
                      #       But the code is not yet there (other PRs)
                      self.out.msg('\n'.join(salt.cli.support.console.wrap(action[action_name])), ident=2)