def METHOD_NAME(self, poll_callback: Optional[PollCallback] = None) -> None:
    """
    Polls the GRPC parent connection for data, to be used before calling recv.  This prevents
    us from hanging indefinitely in the case where the environment process has died or was not
    launched.
    Additionally, a callback can be passed to periodically check the state of the environment.
    This is used to detect the case when the environment dies without cleaning up the connection,
    so that we can stop sooner and raise a more appropriate error.
    """
    deadline = time.monotonic() + self.timeout_wait
    callback_timeout_wait = self.timeout_wait // 10
    while time.monotonic() < deadline:
        if self.unity_to_external.parent_conn.poll(callback_timeout_wait):
            # Got an acknowledgment from the connection
            return
        if poll_callback:
            # Fire the callback - if it detects something wrong, it should raise an exception.
            poll_callback()
    # Got this far without reading any data from the connection, so it must be dead.
    raise UnityTimeOutException(
        "The Unity environment took too long to respond. Make sure that :\n"
        "\t The environment does not need user interaction to launch\n"
        '\t The Agents\' Behavior Parameters > Behavior Type is set to "Default"\n'
        "\t The environment and the Python interface have compatible versions.\n"
        "\t If you're running on a headless server without graphics support, turn off display "
        "by either passing --no-graphics option or build your Unity executable as server build."
    )