code: def extract(self, feature, remove_subfeatures=False):
          '''Extract a feature from the sequence. This operation is complementary
          to the .excise() method.
  
          :param feature: Feature object.
          :type feature: coral.sequence.Feature
          :param remove_subfeatures: Remove all features in the extracted
                                     sequence aside from the input feature.
          :type remove_subfeatures: bool
          :returns: A subsequence from start to stop of the feature.
  
          '''
          extracted = self[feature.start:feature.stop]
          # Turn gaps into Ns or Xs
          for gap in feature.gaps:
              for i in range(*gap):
                  extracted[i] = self._any_char
          if remove_subfeatures:
              # Keep only the feature specified
              extracted.features = [feature]
          # Update feature locations
          # copy them
          for feature in extracted.features:
              feature.move(-feature.start)
          return extractef extract(self, feature, remove_subfeatures=False):
          '''Extract a feature from the sequence. This operation is complementary
          to the .excise() method.
  
          :param feature: Feature object.
          :type feature: coral.sequence.Feature
          :param remove_subfeatures: Remove all features in the extracted
                                     sequence aside from the input feature.
          :type remove_subfeatures: bool
          :returns: A subsequence from start to stop of the feature.
  
          '''
          extracted = self[feature.start:feature.stop]
          # Turn gaps into Ns or Xs
          for gap in feature.gaps:
              for i in range(*gap):
                  extracted[i] = self._any_char
          if remove_subfeatures:
              # Keep only the feature specified
              extracted.features = [feature]
          # Update feature locations
          # copy them
          for feature in extracted.features:
              feature.move(-feature.start)
          return extracted
docs: Extract a feature from the sequence. This operation is complementary
          to the .excise() method.
  
          :param feature: Feature object.
          :type feature: coral.sequence.Feature
          :param remove_subfeatures: Remove all features in the extracted
                                     sequence aside from the input feature.
          :type remove_subfeatures: bool
          :returns: A subsequence from start to stop of the feature.