def get_rotation(transform):
    """Gets rotation part of transform
    :param transform: A minimum 3x3 matrix
    """
    assert transform.shape[0] >= 3 \
           and transform.shape[1] >= 3, \
        "Not a transform? Shape: %s" % \
        transform.shape.__repr__()
    assert len(transform.shape) == 2, \
        "Assumed 2D matrices: %s" % \
        transform.shape.__repr__()

    return transform[:3, :3]