parameters: (self, points)
return_statement: return result
docstring: :type points: List[List[int]]
          :rtype: int
docstring_summary: :type points: List[List[int]]
          :rtype: int
docstring_tokens: : type points : List [ List [ int ]] : rtype : int
function: def numberOfBoomerangs(self, points):
          """
          :type points: List[List[int]]
          :rtype: int
          """
          result = 0
  
          for i in xrange(len(points)):
              group = collections.defaultdict(int)
              for j in xrange(len(points)):
                  if j == i:
                      continue
                  dx, dy =  points[i][0] - points[j][0], points[i][1] - points[j][1]
                  group[dx**2 + dy**2] += 1
  
              for _, v in group.iteritems():
                  if v > 1:
                      result += v * (v-1)
  
          return result
function_tokens: def numberOfBoomerangs ( self , points ) : result = 0 for i in xrange ( len ( points ) ) : group = collections . defaultdict ( int ) for j in xrange ( len ( points ) ) : if j == i : continue dx , dy = points [ i ] [ 0 ] - points [ j ] [ 0 ] , points [ i ] [ 1 ] - points [ j ] [ 1 ] group [ dx ** 2 + dy ** 2 ] += 1 for _ , v in group . iteritems ( ) : if v > 1 : result += v * ( v - 1 ) return result