from contextlib import suppress
import socket


def get_ip_hostname(ip):
    """
    Returns the hostname of a given IP address

    Args:
        ip (str): A string containing an IP address

    Returns:
        str: The hostname of the IP address
        None: If no hostname was found
    """
    with suppress(Exception):
        return socket.gethostbyaddr(ip)[0]