I don't know why the function name has been considered as a variable, how should I solve this?
You need to call self.getlen(dataSet), since you defined the function as a member of the class.
self.getlen(dataSet)