nodes: 0, module; 1, function_definition; 2, function_name:metricCompute; 3, parameters; 4, block; 5, identifier:self; 6, identifier:sensorToBody; 7, identifier:bodyToSpecificObject; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, comment:"""
      Compute the
        "sensor's location relative to a specific object"
      from the
        "body's location relative to a specific object"
      and the
        "sensor's location relative to body"
  
      @param sensorToBody (numpy array)
      Active cells of a single module that represents the sensor's location
      relative to the body
  
      @param bodyToSpecificObject (numpy array)
      Active cells of a single module that represents the body's location relative
      to a specific object
      """; 13, assignment; 14, assignment; 15, assignment; 16, identifier:overlaps; 17, call; 18, attribute; 19, subscript; 20, attribute; 21, call; 22, attribute; 23, argument_list; 24, identifier:self; 25, identifier:activeMetricSegments; 26, call; 27, integer:0; 28, identifier:self; 29, identifier:activeCells; 30, attribute; 31, argument_list; 32, attribute; 33, identifier:computeActivity; 34, dictionary; 35, attribute; 36, argument_list; 37, identifier:np; 38, identifier:unique; 39, call; 40, identifier:self; 41, identifier:metricConnections; 42, pair; 43, pair; 44, identifier:np; 45, identifier:where; 46, comparison_operator:overlaps >= 2; 47, attribute; 48, argument_list; 49, string:"bodyToSpecificObject"; 50, identifier:bodyToSpecificObject; 51, string:"sensorToBody"; 52, identifier:sensorToBody; 53, identifier:overlaps; 54, integer:2; 55, attribute; 56, identifier:mapSegmentsToCells; 57, attribute; 58, identifier:self; 59, identifier:metricConnections; 60, identifier:self; 61, identifier:activeMetricSegments
code: def metricCompute(self, sensorToBody, bodyToSpecificObject):
      """
      Compute the
        "sensor's location relative to a specific object"
      from the
        "body's location relative to a specific object"
      and the
        "sensor's location relative to body"
  
      @param sensorToBody (numpy array)
      Active cells of a single module that represents the sensor's location
      relative to the body
  
      @param bodyToSpecificObject (numpy array)
      Active cells of a single module that represents the body's location relative
      to a specific object
      """
      overlaps = self.metricConnections.computeActivity({
        "bodyToSpecificObject": bodyToSpecificObject,
        "sensorToBody": sensorToBody,
      })
  
      self.activeMetricSegments = np.where(overlaps >= 2)[0]
      self.activeCells = np.unique(
        self.metricConnections.mapSegmentsToCells(
          self.activeMetricSegments))