def is_leaf(node_value):
    """This function checks whether a validation node is a leaf or not.

    Args:
      node_value(dict): The value of the node you want to check.

    Returns:
      : bool.

    """
    return isinstance(node_value, dict) and 'required' in node_value