code: def check_point_shape(point, manifold, suppress_error=False):
      """Check if the shape of point does not match the shape of a manifold or metric.
  
      If the final elements of the shape of point do not match the shape of manifold
      (which may be any object with a shape attribute, such as a Riemannian metric) then
      point cannot be an array of points on the manifold (or similar) and a ValueError is
      raised. The error can be suppressed by setting suppress_error to True.
  
      Parameters
      ----------
      point : array-like
          The point to check the shape of.
      manifold : {Manifold, RiemannianMetric}
          The object to check the point against
      suppress_error : bool
          Whether to suppress the ShapeError if the shapes do not match. Optional, default
          is False.
  
      Returns
      -------
      shapes_match : bool
          Whether the shape of the point matches the shape of the manifold or metric.
  
      Raises
      ------
      ValueError
          If the final dimensions of point are not equal to the final dimensions of
          manifold.
      """
      representation_type = -1 * len(manifold.shape)
      shapes_match = (
          point.shape[representation_type:]
          == manifold.shape[representation_type:]
      )
      if not suppress_error and not shapes_match:
          shape_error_msg = (
              f"The shape of {point}, which is {point.shape}, is not"
              f" compatible with the shape of the {type(manifold).__name__}"
              f" object, which is {manifold.shape}."
          )
          raise ShapeError(shape_error_msg)
      return shapes_match
  
file_path: geomstats/geomstats/errors.py
imports: import math
  import geomstats.backend
label_desc: Use image node_id 5 for calling a global function with example usage: check_point_shape(point, manifold, suppress_error) and returns: shapes_match