I just tried the following code:

```
class Solution(object):
def numberOfBoomerangs(self, points):
"""
:type points: List[List[int]]
:rtype: int
"""
dics = []
for i in range(len(points)):
subDic = {}
for j in range(len(points)):
dis = math.sqrt((points[i][0] - points[j][0])**2 + (points[i][1] - points[j][1])**2)
subDic[dis] = subDic[dis].append(points[j]) if dis in subDic else [points[j]]
dics.append(subDic)
count = 0
for dic in dics:
for key in dic:
if len(dic[key]) >= 2:
count += math.factorial(len(dic[key]))
return count
```

It failed at line 18 which is if len(dic[key]) >= 2: with error of Line 18: TypeError: object of type 'NoneType' has no len(). The test input is [[0,0],[1,0],[2,0]]

I was trying to debug it but wasn't able to figure it our. Can anyone help with this please?