def METHOD_NAME(angle, degrees):
    """
    Returns 3D rotation matrix for z axis using direction cosine
    Parameters
    ----------
    angle : float
        angle or rotation around z axis
    degrees : bool
        if radian or degrees
    """
    if degrees:
        alpha = angle / 180. * np.pi
    else:
        alpha = angle
    rot_matrix = np.zeros((3,3), dtype=np.float64)
    rot_matrix[0][0] = np.cos(alpha)
    rot_matrix[0][1] = - np.sin(alpha)
    rot_matrix[1][0] = np.sin(alpha)
    rot_matrix[1][1] = np.cos(alpha)
    rot_matrix[2][2] = 1
    return rot_matrix