<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_name_or_instance_id(self, with_id=False):
 """Returns the name of an instance if existant, else return the instance id Args: with_id (bool):
 Include the instance ID even if the name is found (default: False) Returns: Name and/or instance ID of the instance object """

        name = self.get_tag('Name', case_sensitive=False)
        if name and len(name.value.strip()) > 0:
            return '{0} ({1})'.format(name.value, self.id) if with_id else name.value

        return self.id