def METHOD_NAME(self, context):
    if not self.target.is_rooted and self.as_root:
        raise ConfigError('The target is not rooted, cannot run poller as root.')
    host_poller = context.get_resource(Executable(self, self.target.abi,
                                                  "poller"))
    target_poller = self.target.install(host_poller)
    expanded_paths = []
    for path in self.files:
        if "*" in path:
            for p in self.target.list_directory(path):
                expanded_paths.append(p)
        else:
            expanded_paths.append(path)
    self.files = expanded_paths
    if not self.labels:
        self.labels = self._generate_labels()
    self.target_output_path = self.target.path.join(self.target.working_directory, 'poller.csv')
    self.target_log_path = self.target.path.join(self.target.working_directory, 'poller.log')
    marker_option = ''
    if self.align_with_ftrace:
        marker_option = '-m'
        signal.connect(self._adjust_timestamps, signal.AFTER_JOB_OUTPUT_PROCESSED)
    self.command = '{} -t {} {} -l {} {} > {} 2>{}'.format(target_poller,
                                                           self.sample_interval * 1000,
                                                           marker_option,
                                                           ','.join(self.labels),
                                                           ' '.join(self.files),
                                                           self.target_output_path,
                                                           self.target_log_path)