parameters: (vertices, theta, anchor=None)
return_statement: return (res + anchor).T.reshape(-1)
docstring: rotate vertices around anchor
      Input:
          vertices: vertices of text region <numpy.ndarray, (8,)>
          theta   : angle in radian measure
          anchor  : fixed position during rotation
      Output:
          rotated vertices <numpy.ndarray, (8,)>
docstring_summary: rotate vertices around anchor
      Input:
          vertices: vertices of text region <numpy.ndarray, (8,)>
          theta   : angle in radian measure
          anchor  : fixed position during rotation
      Output:
          rotated vertices <numpy.ndarray, (8,)>
docstring_tokens: rotate vertices around anchor Input : vertices : vertices of text region <numpy . ndarray ( 8 ) > theta : angle in radian measure anchor : fixed position during rotation Output : rotated vertices <numpy . ndarray ( 8 ) >
function: def rotate_vertices(vertices, theta, anchor=None):
      '''rotate vertices around anchor
      Input:
          vertices: vertices of text region <numpy.ndarray, (8,)>
          theta   : angle in radian measure
          anchor  : fixed position during rotation
      Output:
          rotated vertices <numpy.ndarray, (8,)>
      '''
      v = vertices.reshape((4, 2)).T
      if anchor is None:
          anchor = v[:, :1]
      rotate_mat = get_rotate_mat(theta)
      res = np.dot(rotate_mat, v - anchor)
      return (res + anchor).T.reshape(-1)
function_tokens: def rotate_vertices ( vertices , theta , anchor = None ) : v = vertices . reshape ( ( 4 , 2 ) ) . T if anchor is None : anchor = v [ : , : 1 ] rotate_mat = get_rotate_mat ( theta ) res = np . dot ( rotate_mat , v - anchor ) return ( res + anchor ) . T . reshape ( - 1 )