def METHOD_NAME(location):
    """
    Args:
        location: Grid.
    Returns:
        tuple(int): Location, such as (4, 3)
    """
    if hasattr(location, 'location'):
        return location.location
    elif isinstance(location, str):
        return node2location(location)
    else:
        return location