def _check_misplaced_format_function(self, call_node):
    if (not isinstance(call_node.func, astroid.Attribute)):
        return
    if (call_node.func.attrname != 'format'):
        return
    expr = utils.safe_infer(call_node.func.expr)
    if (expr is astroid.Uninferable):
        return
    if (not expr):
        call_expr = call_node.func.expr
        if (not isinstance(call_expr, astroid.Call)):
            return
        if (isinstance(call_expr.func, astroid.Name) and (call_expr.func.name == 'print')):
            self.add_message('misplaced-format-function', node=call_node)
def _check_misplaced_format_function(self, call_node):
    if (not isinstance(call_node.func, astroid.Attribute)):
        return
    if (call_node.func.attrname != 'format'):
        return
    expr = utils.safe_infer(call_node.func.expr)
    if (expr is astroid.Uninferable):
        return
    if (not expr):
        call_expr = call_node.func.expr
        if (not isinstance(call_expr, astroid.Call)):
            return
        if (isinstance(call_expr.func, astroid.Name) and (call_expr.func.name == 'print')):
            self.add_message('misplaced-format-function', node=call_node)