docs: def get_event_data(self, section, time_in_seconds=False):
          """ Get the template or complement event data.
          
          :param section: Either template, complement, or both.
          :param time_in_seconds: Return the start and length fields
              in seconds, rather than samples.
          :return: The event dataset for the section. If section=both
              then it returns a tuple with both sections. Returns None
              if the section does not exist.
          """
          if section not in ['template', 'complement', 'both']:
              raise Exception('Unrecognized section: {} Expected: "template", "complement" or "both"'.format(section))
          results = self.get_results()
          if results is None:
              return None, None if section is 'both' else None
          if section == 'both':
              sections = ['template', 'complement']
          else:
              sections = [section]
          evdet_group, _ = self._find_event_data()
          with EventDetectionTools(self.handle, group_name=evdet_group) as evdet:
              event_data, _ = evdet.get_event_data(time_in_seconds=time_in_seconds)
          datasets = [None, None]
          for n, this_section in enumerate(sections):
              if not results['has_{}'.format(this_section)]:
                  continue
              ev1 = results['start_event_{}'.format(this_section)]
              ev2 = results['end_event_{}'.format(this_section)]
              datasets[n] = event_data[ev1:ev2]
          if section == 'both':
              return tuple(datasets)
          return datasets[0]