def METHOD_NAME(self, hostname):
    """
    Checks if the machine has the given hostname.
    A machine might have more than one hostname. The hostname is then
    provided as a list
    :param hostname: The hostname searched for
    :type hostname: basestring
    :return: True or false
    """
    if type(self.hostname) == list:
        return hostname in self.hostname
    elif isinstance(self.hostname, str):
        return hostname.lower() == self.hostname.lower()