parameters: (self, A, B)
return_statement: return min(len(A)-A.count(x), len(B)-B.count(x))
docstring: :type A: List[int]
          :type B: List[int]
          :rtype: int
docstring_summary: :type A: List[int]
          :type B: List[int]
          :rtype: int
docstring_tokens: : type A : List [ int ] : type B : List [ int ] : rtype : int
function: def minDominoRotations(self, A, B):
          """
          :type A: List[int]
          :type B: List[int]
          :rtype: int
          """
          intersect = reduce(set.__and__, [set(d) for d in itertools.izip(A, B)])
          if not intersect:
              return -1
          x = intersect.pop()
          return min(len(A)-A.count(x), len(B)-B.count(x))
function_tokens: def minDominoRotations ( self , A , B ) : intersect = reduce ( set . __and__ , [ set ( d ) for d in itertools . izip ( A , B ) ] ) if not intersect : return - 1 x = intersect . pop ( ) return min ( len ( A ) - A . count ( x ) , len ( B ) - B . count ( x ) )