Generate program that has the following intention:

This is the structure of the `NAME_1` class:
````
class NAME_1:
    def __init__(
        self,
        value=None,
        successor=None,
        successors=[],
        predecessors=[],
        incoming_nodes=[],
        outgoing_nodes=[],
    ):
        self.value = value
        self.successor = successor
        self.successors = successors
        self.predecessors = predecessors
        self.incoming_nodes = incoming_nodes
        self.outgoing_nodes = outgoing_nodes
````
The intention of the program is to implement a doubly linked list in Python, where each NAME_1 in the list has a reference to its successor, predecessor, and incoming and outgoing nodes. The NAME_1 class is designed to be the basic building block of the linked list. The p5 function is a helper function that checks if a given NAME_1 is the fifth NAME_1 in the linked list, counting from a specific starting NAME_1.
 The letter d should appear at least 4 times.
user