docs: def add_analysis(self, component, group_name, attrs, config=None):
          """ Add a new analysis group to the file.
          
          :param component: The component name.
          :param group_name: The name to use for the group. Must not already
              exist in the file e.g. 'Test_000'.
          :param attrs: A dictionary containing the key-value pairs to
              put in the analysis group as attributes. Keys must be strings,
              and values must be strings or numeric types.
          :param config: A dictionary of dictionaries. The top level keys
              should be the name of analysis steps, and should contain
              key value pairs for analysis parameters used.
          """
          self.assert_writeable()
          group = 'Analyses/{}'.format(group_name)
          cfg_group = '{}/Configuration'.format(group)
          group_attrs = attrs.copy()
          group_attrs['component'] = component
          self._add_group(group, group_attrs)
          self.handle[group].create_group('Summary')
          self.handle[group].create_group('Configuration')
          if config is not None:
              self._add_attribute_tree(cfg_group, config)