<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def path_new_using_function( w: int, h: int, func: Callable[[int, int, int, int, Any], float], userData: Any = 0, dcost: float = 1.41, ) -> tcod.path.AStar: """Return a new AStar using the given callable function. Args: w (int):
 Clipping width. h (int):
 Clipping height. func (Callable[[int, int, int, int, Any], float]):
 userData (Any):
 dcost (float):
 A multiplier for the cost of diagonal movement. Can be set to 0 to disable diagonal movement. Returns: AStar: A new AStar instance. """

    return tcod.path.AStar(
        tcod.path._EdgeCostFunc((func, userData), (w, h)), dcost
    )