code: def test_feature_arclength():
      from dipy.tracking.streamline import length
  
      # Test subclassing Feature
      class ArcLengthFeature(dipysfeature.Feature):
          def __init__(self):
              super(ArcLengthFeature, self).__init__(
                  is_order_invariant=True
              )
  
          def infer_shape(self, streamline):
              return 1, 1
  
          def extract(self, streamline):
              return length(streamline)[None, None]
  
      for feature in [
          dipysfeature.ArcLengthFeature(),
          ArcLengthFeature(),
      ]:
          for s in [s1, s2, s3, s4]:
              # Test method infer_shape
              assert_equal(feature.infer_shape(s), (1, 1))
  
              # Test method extract
              features = feature.extract(s)
              assert_equal(features.shape, (1, 1))
              assert_array_almost_equal(features, length(s)[None, None])
  
          # This feature type is order invariant
          assert_true(feature.is_order_invariant)
          for s in [s1, s2, s3, s4]:
              features = feature.extract(s)
              features_flip = feature.extract(s[::-1])
              assert_array_almost_equal(features, features_flip)
  
file_path: dipy/dipy/segment/tests/test_feature.py
imports: import sys
  import numpy
  from numpy.testing import assert_array_equal, assert_array_almost_equal, assert_raises, assert_equal
  import dipy.segment.featurespeed
  import dipy.segment.metric
  import dipy.segment.metricspeed
  from dipy.segment.featurespeed import extract
  from dipy.testing import assert_true, assert_false
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 5 for calling a global function with example usage: test_feature_arclength() and returns: int,  int, length