nodes: 0, module; 1, function_definition; 2, function_name:bar; 3, parameters; 4, block; 5, identifier:df; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, default_parameter; 15, default_parameter; 16, expression_statement; 17, expression_statement; 18, expression_statement; 19, expression_statement; 20, expression_statement; 21, expression_statement; 22, expression_statement; 23, expression_statement; 24, comment:# Start appending elements, starting with a modified bottom x axis.; 25, if_statement; 26, comment:# Create the third axis, which displays columnar totals above the rest of the plot.; 27, expression_statement; 28, expression_statement; 29, expression_statement; 30, expression_statement; 31, expression_statement; 32, expression_statement; 33, for_statement; 34, if_statement; 35, identifier:figsize; 36, tuple; 37, identifier:fontsize; 38, integer:16; 39, identifier:labels; 40, None; 41, identifier:log; 42, False; 43, identifier:color; 44, string; 45, identifier:inline; 46, False; 47, identifier:filter; 48, None; 49, identifier:n; 50, integer:0; 51, identifier:p; 52, integer:0; 53, identifier:sort; 54, None; 55, comment:"""
      A bar chart visualization of the nullity of the given DataFrame.
  
      :param df: The input DataFrame.
      :param log: Whether or not to display a logorithmic plot. Defaults to False (linear).
      :param filter: The filter to apply to the heatmap. Should be one of "top", "bottom", or None (default).
      :param n: The cap on the number of columns to include in the filtered DataFrame.
      :param p: The cap on the percentage fill of the columns in the filtered DataFrame.
      :param sort: The sort to apply to the heatmap. Should be one of "ascending", "descending", or None (default).
      :param figsize: The size of the figure to display.
      :param fontsize: The figure's font size. This default to 16.
      :param labels: Whether or not to display the column names. Would need to be turned off on particularly large
      displays. Defaults to True.
      :param color: The color of the filled columns. Default to the RGB multiple `(0.25, 0.25, 0.25)`.
      :return: If `inline` is False, the underlying `matplotlib.figure` object. Else, nothing.
      """; 56, assignment; 57, assignment; 58, assignment; 59, call; 60, call; 61, assignment; 62, assignment; 63, boolean_operator; 64, block; 65, else_clause; 66, assignment; 67, call; 68, call; 69, call; 70, call; 71, call; 72, identifier:ax; 73, identifier:axes; 74, block; 75, identifier:inline; 76, block; 77, else_clause; 78, integer:24; 79, integer:10; 80, string_content:dimgray; 81, identifier:nullity_counts; 82, binary_operator:len(df) - df.isnull().sum(); 83, identifier:df; 84, call; 85, identifier:df; 86, call; 87, attribute; 88, argument_list; 89, attribute; 90, argument_list; 91, identifier:ax1; 92, call; 93, identifier:axes; 94, list; 95, identifier:labels; 96, parenthesized_expression; 97, expression_statement; 98, comment:# Create the numerical ticks.; 99, expression_statement; 100, expression_statement; 101, if_statement; 102, block; 103, identifier:ax3; 104, call; 105, attribute; 106, argument_list; 107, attribute; 108, argument_list; 109, attribute; 110, argument_list; 111, attribute; 112, argument_list; 113, attribute; 114, argument_list; 115, expression_statement; 116, expression_statement; 117, expression_statement; 118, expression_statement; 119, expression_statement; 120, expression_statement; 121, expression_statement; 122, block; 123, call; 124, call; 125, identifier:nullity_filter; 126, argument_list; 127, identifier:nullity_sort; 128, argument_list; 129, identifier:plt; 130, identifier:figure; 131, keyword_argument; 132, parenthesized_expression; 133, identifier:plot; 134, keyword_argument; 135, keyword_argument; 136, keyword_argument; 137, keyword_argument; 138, keyword_argument; 139, attribute; 140, argument_list; 141, identifier:ax1; 142, boolean_operator; 143, call; 144, assignment; 145, call; 146, not_operator; 147, block; 148, else_clause; 149, expression_statement; 150, attribute; 151, argument_list; 152, identifier:axes; 153, identifier:append; 154, identifier:ax3; 155, identifier:ax3; 156, identifier:set_xticks; 157, call; 158, identifier:ax3; 159, identifier:set_xlim; 160, call; 161, identifier:ax3; 162, identifier:set_xticklabels; 163, attribute; 164, keyword_argument; 165, keyword_argument; 166, keyword_argument; 167, identifier:ax3; 168, identifier:grid; 169, False; 170, call; 171, call; 172, call; 173, call; 174, call; 175, call; 176, call; 177, return_statement; 178, identifier:len; 179, argument_list; 180, attribute; 181, argument_list; 182, identifier:df; 183, keyword_argument; 184, keyword_argument; 185, keyword_argument; 186, identifier:df; 187, keyword_argument; 188, identifier:figsize; 189, identifier:figsize; 190, binary_operator:nullity_counts / len(df); 191, identifier:kind; 192, string; 193, identifier:figsize; 194, identifier:figsize; 195, identifier:fontsize; 196, identifier:fontsize; 197, identifier:log; 198, identifier:log; 199, identifier:color; 200, identifier:color; 201, identifier:plt; 202, identifier:gca; 203, comparison_operator:labels is None; 204, comparison_operator:len(df.columns) <= 50; 205, attribute; 206, argument_list; 207, identifier:ax2; 208, call; 209, attribute; 210, argument_list; 211, identifier:log; 212, expression_statement; 213, expression_statement; 214, expression_statement; 215, comment:# For some reason when a logarithmic plot is specified `ax1` always contains two more ticks than actually; 216, comment:# appears in the plot. The fix is to ignore the first and last entries. Also note that when a log scale; 217, comment:# is used, we have to make it match the `ax1` layout ourselves.; 218, block; 219, call; 220, identifier:ax1; 221, identifier:twiny; 222, attribute; 223, argument_list; 224, attribute; 225, argument_list; 226, identifier:nullity_counts; 227, identifier:values; 228, identifier:fontsize; 229, identifier:fontsize; 230, identifier:rotation; 231, integer:45; 232, identifier:ha; 233, string; 234, attribute; 235, argument_list; 236, attribute; 237, argument_list; 238, attribute; 239, argument_list; 240, attribute; 241, argument_list; 242, attribute; 243, argument_list; 244, attribute; 245, argument_list; 246, attribute; 247, argument_list; 248, identifier:ax1; 249, identifier:df; 250, call; 251, identifier:sum; 252, identifier:filter; 253, identifier:filter; 254, identifier:n; 255, identifier:n; 256, identifier:p; 257, identifier:p; 258, identifier:sort; 259, identifier:sort; 260, identifier:nullity_counts; 261, call; 262, string_content:bar; 263, identifier:labels; 264, None; 265, call; 266, integer:50; 267, identifier:ax1; 268, identifier:set_xticklabels; 269, call; 270, keyword_argument; 271, keyword_argument; 272, keyword_argument; 273, attribute; 274, argument_list; 275, identifier:axes; 276, identifier:append; 277, identifier:ax2; 278, call; 279, call; 280, call; 281, expression_statement; 282, expression_statement; 283, expression_statement; 284, attribute; 285, argument_list; 286, identifier:ax1; 287, identifier:get_xticks; 288, identifier:ax1; 289, identifier:get_xlim; 290, string_content:left; 291, subscript; 292, identifier:set_visible; 293, False; 294, subscript; 295, identifier:set_visible; 296, False; 297, subscript; 298, identifier:set_visible; 299, False; 300, subscript; 301, identifier:set_visible; 302, False; 303, attribute; 304, identifier:set_ticks_position; 305, string; 306, attribute; 307, identifier:set_ticks_position; 308, string; 309, identifier:plt; 310, identifier:show; 311, attribute; 312, argument_list; 313, identifier:len; 314, argument_list; 315, identifier:len; 316, argument_list; 317, attribute; 318, argument_list; 319, identifier:rotation; 320, integer:45; 321, identifier:ha; 322, string; 323, identifier:fontsize; 324, identifier:fontsize; 325, identifier:ax1; 326, identifier:twinx; 327, attribute; 328, argument_list; 329, attribute; 330, argument_list; 331, attribute; 332, argument_list; 333, call; 334, call; 335, call; 336, identifier:ax1; 337, identifier:set_xticks; 338, list; 339, attribute; 340, string; 341, attribute; 342, string; 343, attribute; 344, string; 345, attribute; 346, string; 347, identifier:ax; 348, identifier:xaxis; 349, string_content:none; 350, identifier:ax; 351, identifier:yaxis; 352, string_content:none; 353, identifier:df; 354, identifier:isnull; 355, identifier:df; 356, attribute; 357, identifier:ax1; 358, identifier:get_xticklabels; 359, string_content:right; 360, identifier:ax1; 361, identifier:set_ylim; 362, list; 363, identifier:ax2; 364, identifier:set_yticks; 365, call; 366, identifier:ax2; 367, identifier:set_yticklabels; 368, list_comprehension; 369, keyword_argument; 370, attribute; 371, argument_list; 372, attribute; 373, argument_list; 374, attribute; 375, argument_list; 376, identifier:ax; 377, identifier:spines; 378, string_content:top; 379, identifier:ax; 380, identifier:spines; 381, string_content:right; 382, identifier:ax; 383, identifier:spines; 384, string_content:bottom; 385, identifier:ax; 386, identifier:spines; 387, string_content:left; 388, identifier:df; 389, identifier:columns; 390, integer:0; 391, integer:1; 392, attribute; 393, argument_list; 394, call; 395, for_in_clause; 396, identifier:fontsize; 397, identifier:fontsize; 398, identifier:ax2; 399, identifier:set_yscale; 400, string; 401, identifier:ax2; 402, identifier:set_ylim; 403, call; 404, identifier:ax2; 405, identifier:set_yticklabels; 406, list_comprehension; 407, keyword_argument; 408, identifier:ax1; 409, identifier:get_yticks; 410, identifier:int; 411, argument_list; 412, identifier:n; 413, call; 414, string_content:log; 415, attribute; 416, argument_list; 417, call; 418, for_in_clause; 419, identifier:fontsize; 420, identifier:fontsize; 421, binary_operator:n*len(df); 422, attribute; 423, argument_list; 424, identifier:ax1; 425, identifier:get_ylim; 426, identifier:int; 427, argument_list; 428, identifier:n; 429, call; 430, identifier:n; 431, call; 432, identifier:ax1; 433, identifier:get_yticks; 434, binary_operator:n*len(df); 435, attribute; 436, argument_list; 437, identifier:len; 438, argument_list; 439, identifier:n; 440, call; 441, identifier:ax1; 442, identifier:get_yticks; 443, identifier:df; 444, identifier:len; 445, argument_list; 446, identifier:df
code: def bar(df, figsize=(24, 10), fontsize=16, labels=None, log=False, color='dimgray', inline=False,
          filter=None, n=0, p=0, sort=None):
      """
      A bar chart visualization of the nullity of the given DataFrame.
  
      :param df: The input DataFrame.
      :param log: Whether or not to display a logorithmic plot. Defaults to False (linear).
      :param filter: The filter to apply to the heatmap. Should be one of "top", "bottom", or None (default).
      :param n: The cap on the number of columns to include in the filtered DataFrame.
      :param p: The cap on the percentage fill of the columns in the filtered DataFrame.
      :param sort: The sort to apply to the heatmap. Should be one of "ascending", "descending", or None (default).
      :param figsize: The size of the figure to display.
      :param fontsize: The figure's font size. This default to 16.
      :param labels: Whether or not to display the column names. Would need to be turned off on particularly large
      displays. Defaults to True.
      :param color: The color of the filled columns. Default to the RGB multiple `(0.25, 0.25, 0.25)`.
      :return: If `inline` is False, the underlying `matplotlib.figure` object. Else, nothing.
      """
      nullity_counts = len(df) - df.isnull().sum()
      df = nullity_filter(df, filter=filter, n=n, p=p)
      df = nullity_sort(df, sort=sort)
  
      plt.figure(figsize=figsize)
      (nullity_counts / len(df)).plot(kind='bar', figsize=figsize, fontsize=fontsize, log=log, color=color)
      ax1 = plt.gca()
  
      axes = [ax1]
  
      # Start appending elements, starting with a modified bottom x axis.
      if labels or (labels is None and len(df.columns) <= 50):
          ax1.set_xticklabels(ax1.get_xticklabels(), rotation=45, ha='right', fontsize=fontsize)
  
          # Create the numerical ticks.
          ax2 = ax1.twinx()
          axes.append(ax2)
          if not log:
              ax1.set_ylim([0, 1])
              ax2.set_yticks(ax1.get_yticks())
              ax2.set_yticklabels([int(n*len(df)) for n in ax1.get_yticks()], fontsize=fontsize)
          else:
              # For some reason when a logarithmic plot is specified `ax1` always contains two more ticks than actually
              # appears in the plot. The fix is to ignore the first and last entries. Also note that when a log scale
              # is used, we have to make it match the `ax1` layout ourselves.
              ax2.set_yscale('log')
              ax2.set_ylim(ax1.get_ylim())
              ax2.set_yticklabels([int(n*len(df)) for n in ax1.get_yticks()], fontsize=fontsize)
      else:
          ax1.set_xticks([])
  
      # Create the third axis, which displays columnar totals above the rest of the plot.
      ax3 = ax1.twiny()
      axes.append(ax3)
      ax3.set_xticks(ax1.get_xticks())
      ax3.set_xlim(ax1.get_xlim())
      ax3.set_xticklabels(nullity_counts.values, fontsize=fontsize, rotation=45, ha='left')
      ax3.grid(False)
  
      for ax in axes:
          ax.spines['top'].set_visible(False)
          ax.spines['right'].set_visible(False)
          ax.spines['bottom'].set_visible(False)
          ax.spines['left'].set_visible(False)
          ax.xaxis.set_ticks_position('none')
          ax.yaxis.set_ticks_position('none')
  
      if inline:
          plt.show()
      else:
          return ax1