code: def read(self, filename):
          
          tribe = Tribe()
          tribe.read(filename=filename)
          if len(tribe) > 1:
              raise IOError('Multiple templates in file')
          for key in self.__dict__.keys():
              self.__dict__[key] = tribe[0].__dict__[key]
          return self
docs: Read template from tar format with metadata.
  
          :type filename: str
          :param filename: Filename to read template from.
  
          .. rubric:: Example
  
          >>> template_a = Template(
          ...     name='a', st=read(), lowcut=2.0, highcut=8.0, samp_rate=100,
          ...     filt_order=4, process_length=3600, prepick=0.5)
          >>> template_a.write(
          ...     'test_template_read') # doctest: +NORMALIZE_WHITESPACE
          Template a:
           3 channels;
           lowcut: 2.0 Hz;
           highcut: 8.0 Hz;
           sampling rate 100 Hz;
           filter order: 4;
           process length: 3600 s
          >>> template_b = Template().read('test_template_read.tgz')
          >>> template_a == template_b
          True