code: def draw_chimera_bqm(bqm, width=None, height=None):
      linear = bqm.linear.keys()
      quadratic = bqm.quadratic.keys()
      if width is None and height is None:
          graph_size = ceil(sqrt((max(linear) + 1) / 8.0))
          width = graph_size
          height = graph_size
      if not width or not height:
          raise Exception("Both dimensions must be defined, not just one.")
      G0 = chimera_graph(height, width, 4)
      G = chimera_graph(height, width, 4)
      non_chimera_nodes = []
      non_chimera_edges = []
      for node in linear:
          if not node in G.nodes:
              non_chimera_nodes.append(node)
      for edge in quadratic:
          if not edge in G.edges:
              non_chimera_edges.append(edge)
      linear_set = set(linear)
      g_node_set = set(G.nodes)
      quadratic_set = set(map(frozenset, quadratic))
      g_edge_set = set(map(frozenset, G.edges))
      non_chimera_nodes = linear_set - g_node_set
      non_chimera_edges = quadratic_set - g_edge_set
      if non_chimera_nodes or non_chimera_edges:
          raise Exception("Input graph is not a chimera graph: Nodes: %s Edges: %s" % (non_chimera_nodes, non_chimera_edges))
      remove_nodes = list(g_node_set - linear_set)
      remove_edges = list(g_edge_set - quadratic_set)
      for edge in remove_edges:
          G.remove_edge(*edge)
      for node in remove_nodes:
          G.remove_node(node)
      node_size = 100
      draw_chimera(G0, node_size=node_size*0.5, node_color='black', edge_color='black')
      draw_chimera(G, node_size=node_size, linear_biases=bqm.linear, quadratic_biases=bqm.quadratic,
                       width=3)
      return