Input:
CODE <module>()
  DOC 'WMAP5'
  RESUME 0
  LOAD_CONST ('WMAP5', None)
  LOAD_CONST <code plotcommand>
  MAKE_FUNCTION defaults
  STORE_NAME plotcommand
  RETURN_CONST None
END
CODE plotcommand(cosmology, plotname)
  DOC 'pass'
  RESUME 0
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 1
  LOAD_CONST 15
  LOAD_CONST 0.2
  CALL 3
  BINARY_OP **
  STORE_FAST xarray
  LOAD_CONST 'c'
  STORE_FAST yval
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 0
  LOAD_CONST 5
  LOAD_CONST 0.5
  CALL 3
  STORE_FAST zarray
  LOAD_CONST 'Halo Mass (M$_{sol}$)'
  STORE_FAST xtitle
  LOAD_CONST 'Concentration'
  STORE_FAST ytitle
  LOAD_CONST 'z='
  STORE_FAST linelabel
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + figure
  CALL 0
  STORE_FAST fig
  LOAD_FAST fig
  LOAD_ATTR NULL|self + add_subplot
  LOAD_CONST 111
  CALL 1
  STORE_FAST ax
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xlabel
  LOAD_FAST xtitle
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_ylabel
  LOAD_FAST ytitle
  CALL 1
  POP_TOP
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + ylim
  LOAD_CONST 2
  LOAD_CONST 30
  BUILD_LIST 2
  CALL 1
  POP_TOP
  LOAD_GLOBAL cm
  LOAD_ATTR NULL|self + rainbow
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + linspace
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_GLOBAL NULL + len
  LOAD_FAST zarray
  CALL 1
  CALL 3
  CALL 1
  STORE_FAST colors
  LOAD_GLOBAL NULL + enumerate
  LOAD_FAST zarray
  CALL 1
  GET_ITER
L1:
  FOR_ITER L2
  UNPACK_SEQUENCE 2
  STORE_FAST zind
  STORE_FAST zval
  LOAD_GLOBAL commah
  LOAD_ATTR NULL|self + run
  LOAD_FAST cosmology
  LOAD_FAST zval
  LOAD_FAST xarray
  KW_NAMES ('cosmology', 'zi', 'Mi')
  CALL 3
  STORE_FAST output
  LOAD_FAST output
  LOAD_FAST yval
  BINARY_SUBSCR
  LOAD_ATTR NULL|self + flatten
  CALL 0
  STORE_FAST yarray
  LOAD_FAST ax
  LOAD_ATTR NULL|self + plot
  LOAD_FAST xarray
  LOAD_FAST yarray
  LOAD_FAST linelabel
  LOAD_GLOBAL NULL + str
  LOAD_FAST zval
  CALL 1
  BINARY_OP +
  LOAD_FAST colors
  LOAD_FAST zind
  BINARY_SUBSCR
  KW_NAMES ('label', 'color')
  CALL 4
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + plot
  LOAD_FAST xarray
  LOAD_GLOBAL commah
  LOAD_ATTR commah
  LOAD_ATTR NULL|self + cduffy
  LOAD_FAST zval
  LOAD_FAST xarray
  CALL 2
  LOAD_CONST 'black'
  KW_NAMES ('color',)
  CALL 3
  POP_TOP
  JUMP_BACKWARD L1
L2:
  END_FOR
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xscale
  LOAD_CONST 'log'
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_yscale
  LOAD_CONST 'log'
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + legend
  LOAD_CONST 1
  KW_NAMES ('loc',)
  CALL 1
  STORE_FAST leg
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_alpha
  LOAD_CONST 0
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_edgecolor
  LOAD_CONST 'white'
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_texts
  CALL 0
  GET_ITER
L3:
  FOR_ITER L4
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_fontsize
  LOAD_CONST 'small'
  CALL 1
  POP_TOP
  JUMP_BACKWARD L3
L4:
  END_FOR
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_lines
  CALL 0
  GET_ITER
L5:
  FOR_ITER L6
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_linewidth
  LOAD_CONST 4
  CALL 1
  POP_TOP
  JUMP_BACKWARD L5
L6:
  END_FOR
  LOAD_FAST plotname
  POP_JUMP_IF_FALSE L7
  LOAD_FAST fig
  LOAD_ATTR NULL|self + tight_layout
  LOAD_CONST 0.2
  KW_NAMES ('pad',)
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST "Plotting to '%s_CM_relation.png'"
  LOAD_FAST plotname
  BINARY_OP %
  CALL 1
  POP_TOP
  LOAD_FAST fig
  LOAD_ATTR NULL|self + savefig
  LOAD_FAST plotname
  LOAD_CONST '_CM_relation.png'
  BINARY_OP +
  LOAD_FAST fig
  LOAD_ATTR dpi
  LOAD_CONST 5
  BINARY_OP *
  KW_NAMES ('dpi',)
  CALL 2
  POP_TOP
  JUMP_FORWARD L8
L7:
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + show
  CALL 0
  POP_TOP
L8:
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_CONST 0.05
  CALL 3
  BINARY_OP **
  LOAD_CONST 1
  BINARY_OP -
  STORE_FAST xarray
  LOAD_CONST 'c'
  STORE_FAST yval
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 6
  LOAD_CONST 14
  LOAD_CONST 2
  CALL 3
  BINARY_OP **
  STORE_FAST zarray
  LOAD_CONST 'Redshift'
  STORE_FAST xtitle
  LOAD_CONST 'NFW Concentration'
  STORE_FAST ytitle
  LOAD_CONST 'log$_{10}$ M$_{z}$(M$_{sol}$)='
  STORE_FAST linelabel
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + figure
  CALL 0
  STORE_FAST fig
  LOAD_FAST fig
  LOAD_ATTR NULL|self + add_subplot
  LOAD_CONST 111
  CALL 1
  STORE_FAST ax
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xlabel
  LOAD_FAST xtitle
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_ylabel
  LOAD_FAST ytitle
  CALL 1
  POP_TOP
  LOAD_GLOBAL cm
  LOAD_ATTR NULL|self + rainbow
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + linspace
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_GLOBAL NULL + len
  LOAD_FAST zarray
  CALL 1
  CALL 3
  CALL 1
  STORE_FAST colors
  LOAD_GLOBAL NULL + enumerate
  LOAD_FAST zarray
  CALL 1
  GET_ITER
L9:
  FOR_ITER L10
  UNPACK_SEQUENCE 2
  STORE_FAST zind
  STORE_FAST zval
  LOAD_GLOBAL commah
  LOAD_ATTR NULL|self + run
  LOAD_FAST cosmology
  LOAD_FAST xarray
  LOAD_FAST zval
  KW_NAMES ('cosmology', 'zi', 'Mi')
  CALL 3
  STORE_FAST output
  LOAD_FAST output
  LOAD_FAST yval
  BINARY_SUBSCR
  LOAD_ATTR NULL|self + flatten
  CALL 0
  STORE_FAST yarray
  LOAD_FAST ax
  LOAD_ATTR NULL|self + plot
  LOAD_FAST xarray
  LOAD_FAST yarray
  LOAD_FAST linelabel
  LOAD_CONST '{0:.1f}'
  LOAD_ATTR NULL|self + format
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + log10
  LOAD_FAST zval
  CALL 1
  CALL 1
  BINARY_OP +
  LOAD_FAST colors
  LOAD_FAST zind
  BINARY_SUBSCR
  KW_NAMES ('label', 'color')
  CALL 4
  POP_TOP
  JUMP_BACKWARD L9
L10:
  END_FOR
  LOAD_FAST ax
  LOAD_ATTR NULL|self + legend
  LOAD_CONST 1
  KW_NAMES ('loc',)
  CALL 1
  STORE_FAST leg
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_alpha
  LOAD_CONST 0
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_edgecolor
  LOAD_CONST 'white'
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_texts
  CALL 0
  GET_ITER
L11:
  FOR_ITER L12
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_fontsize
  LOAD_CONST 'small'
  CALL 1
  POP_TOP
  JUMP_BACKWARD L11
L12:
  END_FOR
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_lines
  CALL 0
  GET_ITER
L13:
  FOR_ITER L14
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_linewidth
  LOAD_CONST 4
  CALL 1
  POP_TOP
  JUMP_BACKWARD L13
L14:
  END_FOR
  LOAD_FAST plotname
  POP_JUMP_IF_FALSE L15
  LOAD_FAST fig
  LOAD_ATTR NULL|self + tight_layout
  LOAD_CONST 0.2
  KW_NAMES ('pad',)
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST "Plotting to '%s_Cz_relation.png'"
  LOAD_FAST plotname
  BINARY_OP %
  CALL 1
  POP_TOP
  LOAD_FAST fig
  LOAD_ATTR NULL|self + savefig
  LOAD_FAST plotname
  LOAD_CONST '_Cz_relation.png'
  BINARY_OP +
  LOAD_FAST fig
  LOAD_ATTR dpi
  LOAD_CONST 5
  BINARY_OP *
  KW_NAMES ('dpi',)
  CALL 2
  POP_TOP
  JUMP_FORWARD L16
L15:
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + show
  CALL 0
  POP_TOP
L16:
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_CONST 0.05
  CALL 3
  BINARY_OP **
  LOAD_CONST 1
  BINARY_OP -
  STORE_FAST xarray
  LOAD_CONST 'zf'
  STORE_FAST yval
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 6
  LOAD_CONST 14
  LOAD_CONST 2
  CALL 3
  BINARY_OP **
  STORE_FAST zarray
  LOAD_CONST 'Redshift'
  STORE_FAST xtitle
  LOAD_CONST 'Formation Redshift'
  STORE_FAST ytitle
  LOAD_CONST 'log$_{10}$ M$_{z}$(M$_{sol}$)='
  STORE_FAST linelabel
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + figure
  CALL 0
  STORE_FAST fig
  LOAD_FAST fig
  LOAD_ATTR NULL|self + add_subplot
  LOAD_CONST 111
  CALL 1
  STORE_FAST ax
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xlabel
  LOAD_FAST xtitle
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_ylabel
  LOAD_FAST ytitle
  CALL 1
  POP_TOP
  LOAD_GLOBAL cm
  LOAD_ATTR NULL|self + rainbow
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + linspace
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_GLOBAL NULL + len
  LOAD_FAST zarray
  CALL 1
  CALL 3
  CALL 1
  STORE_FAST colors
  LOAD_GLOBAL NULL + enumerate
  LOAD_FAST zarray
  CALL 1
  GET_ITER
L17:
  FOR_ITER L18
  UNPACK_SEQUENCE 2
  STORE_FAST zind
  STORE_FAST zval
  LOAD_GLOBAL commah
  LOAD_ATTR NULL|self + run
  LOAD_FAST cosmology
  LOAD_FAST xarray
  LOAD_FAST zval
  KW_NAMES ('cosmology', 'zi', 'Mi')
  CALL 3
  STORE_FAST output
  LOAD_FAST output
  LOAD_FAST yval
  BINARY_SUBSCR
  LOAD_ATTR NULL|self + flatten
  CALL 0
  STORE_FAST yarray
  LOAD_FAST ax
  LOAD_ATTR NULL|self + plot
  LOAD_FAST xarray
  LOAD_FAST yarray
  LOAD_FAST linelabel
  LOAD_CONST '{0:.1f}'
  LOAD_ATTR NULL|self + format
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + log10
  LOAD_FAST zval
  CALL 1
  CALL 1
  BINARY_OP +
  LOAD_FAST colors
  LOAD_FAST zind
  BINARY_SUBSCR
  KW_NAMES ('label', 'color')
  CALL 4
  POP_TOP
  JUMP_BACKWARD L17
L18:
  END_FOR
  LOAD_FAST ax
  LOAD_ATTR NULL|self + legend
  LOAD_CONST 2
  KW_NAMES ('loc',)
  CALL 1
  STORE_FAST leg
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_alpha
  LOAD_CONST 0
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_edgecolor
  LOAD_CONST 'white'
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_texts
  CALL 0
  GET_ITER
L19:
  FOR_ITER L20
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_fontsize
  LOAD_CONST 'small'
  CALL 1
  POP_TOP
  JUMP_BACKWARD L19
L20:
  END_FOR
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_lines
  CALL 0
  GET_ITER
L21:
  FOR_ITER L22
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_linewidth
  LOAD_CONST 4
  CALL 1
  POP_TOP
  JUMP_BACKWARD L21
L22:
  END_FOR
  LOAD_FAST plotname
  POP_JUMP_IF_FALSE L23
  LOAD_FAST fig
  LOAD_ATTR NULL|self + tight_layout
  LOAD_CONST 0.2
  KW_NAMES ('pad',)
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST "Plotting to '%s_zfz_relation.png'"
  LOAD_FAST plotname
  BINARY_OP %
  CALL 1
  POP_TOP
  LOAD_FAST fig
  LOAD_ATTR NULL|self + savefig
  LOAD_FAST plotname
  LOAD_CONST '_zfz_relation.png'
  BINARY_OP +
  LOAD_FAST fig
  LOAD_ATTR dpi
  LOAD_CONST 5
  BINARY_OP *
  KW_NAMES ('dpi',)
  CALL 2
  POP_TOP
  JUMP_FORWARD L24
L23:
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + show
  CALL 0
  POP_TOP
L24:
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_CONST 0.05
  CALL 3
  BINARY_OP **
  LOAD_CONST 1
  BINARY_OP -
  STORE_FAST xarray
  LOAD_CONST 'dMdt'
  STORE_FAST yval
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 10
  LOAD_CONST 14
  LOAD_CONST 0.5
  CALL 3
  BINARY_OP **
  STORE_FAST zarray
  LOAD_CONST 'log$_{10}$ (1+z)'
  STORE_FAST xtitle
  LOAD_CONST 'log$_{10}$ Accretion Rate M$_{sol}$ yr$^{-1}$'
  STORE_FAST ytitle
  LOAD_CONST 'log$_{10}$ M$_z$(M$_{sol}$)='
  STORE_FAST linelabel
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + figure
  CALL 0
  STORE_FAST fig
  LOAD_FAST fig
  LOAD_ATTR NULL|self + add_subplot
  LOAD_CONST 111
  CALL 1
  STORE_FAST ax
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xlabel
  LOAD_FAST xtitle
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_ylabel
  LOAD_FAST ytitle
  CALL 1
  POP_TOP
  LOAD_GLOBAL cm
  LOAD_ATTR NULL|self + rainbow
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + linspace
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_GLOBAL NULL + len
  LOAD_FAST zarray
  CALL 1
  CALL 3
  CALL 1
  STORE_FAST colors
  LOAD_GLOBAL commah
  LOAD_ATTR NULL|self + getcosmo
  LOAD_FAST cosmology
  CALL 1
  STORE_FAST cosmo
  LOAD_GLOBAL NULL + enumerate
  LOAD_FAST zarray
  CALL 1
  GET_ITER
L25:
  EXTENDED_ARG 1
  FOR_ITER L26
  UNPACK_SEQUENCE 2
  STORE_FAST zind
  STORE_FAST zval
  LOAD_GLOBAL commah
  LOAD_ATTR NULL|self + run
  LOAD_FAST cosmology
  LOAD_FAST xarray
  LOAD_FAST zval
  LOAD_CONST False
  LOAD_CONST True
  KW_NAMES ('cosmology', 'zi', 'Mi', 'com', 'mah')
  CALL 5
  STORE_FAST output
  LOAD_FAST output
  LOAD_FAST yval
  BINARY_SUBSCR
  LOAD_ATTR NULL|self + flatten
  CALL 0
  STORE_FAST yarray
  LOAD_FAST ax
  LOAD_ATTR NULL|self + plot
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + log10
  LOAD_FAST xarray
  LOAD_CONST 1.0
  BINARY_OP +
  CALL 1
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + log10
  LOAD_FAST yarray
  CALL 1
  LOAD_FAST linelabel
  LOAD_CONST '{0:.1f}'
  LOAD_ATTR NULL|self + format
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + log10
  LOAD_FAST zval
  CALL 1
  CALL 1
  BINARY_OP +
  LOAD_FAST colors
  LOAD_FAST zind
  BINARY_SUBSCR
  KW_NAMES ('label', 'color')
  CALL 4
  POP_TOP
  LOAD_CONST 71.6
  LOAD_FAST zval
  LOAD_CONST 1000000000000.0
  BINARY_OP /
  BINARY_OP *
  LOAD_FAST cosmo
  LOAD_CONST 'h'
  BINARY_SUBSCR
  LOAD_CONST 0.7
  BINARY_OP /
  BINARY_OP *
  LOAD_CONST -0.24
  LOAD_CONST 0.75
  LOAD_FAST xarray
  LOAD_CONST 1
  BINARY_OP +
  BINARY_OP *
  BINARY_OP +
  BINARY_OP *
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + sqrt
  LOAD_FAST cosmo
  LOAD_CONST 'omega_M_0'
  BINARY_SUBSCR
  LOAD_FAST xarray
  LOAD_CONST 1
  BINARY_OP +
  LOAD_CONST 3
  BINARY_OP **
  BINARY_OP *
  LOAD_FAST cosmo
  LOAD_CONST 'omega_lambda_0'
  BINARY_SUBSCR
  BINARY_OP +
  CALL 1
  BINARY_OP *
  STORE_FAST semianalytic_approx
  LOAD_FAST ax
  LOAD_ATTR NULL|self + plot
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + log10
  LOAD_FAST xarray
  LOAD_CONST 1
  BINARY_OP +
  CALL 1
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + log10
  LOAD_FAST semianalytic_approx
  CALL 1
  LOAD_CONST 'black'
  KW_NAMES ('color',)
  CALL 3
  POP_TOP
  EXTENDED_ARG 1
  JUMP_BACKWARD L25
L26:
  END_FOR
  LOAD_FAST ax
  LOAD_ATTR NULL|self + legend
  LOAD_CONST 2
  KW_NAMES ('loc',)
  CALL 1
  STORE_FAST leg
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_alpha
  LOAD_CONST 0
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_edgecolor
  LOAD_CONST 'white'
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_texts
  CALL 0
  GET_ITER
L27:
  FOR_ITER L28
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_fontsize
  LOAD_CONST 'small'
  CALL 1
  POP_TOP
  JUMP_BACKWARD L27
L28:
  END_FOR
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_lines
  CALL 0
  GET_ITER
L29:
  FOR_ITER L30
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_linewidth
  LOAD_CONST 4
  CALL 1
  POP_TOP
  JUMP_BACKWARD L29
L30:
  END_FOR
  LOAD_FAST plotname
  POP_JUMP_IF_FALSE L31
  LOAD_FAST fig
  LOAD_ATTR NULL|self + tight_layout
  LOAD_CONST 0.2
  KW_NAMES ('pad',)
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST "Plotting to '%s_dMdtz_relation.png'"
  LOAD_FAST plotname
  BINARY_OP %
  CALL 1
  POP_TOP
  LOAD_FAST fig
  LOAD_ATTR NULL|self + savefig
  LOAD_FAST plotname
  LOAD_CONST '_dMdtz_relation.png'
  BINARY_OP +
  LOAD_FAST fig
  LOAD_ATTR dpi
  LOAD_CONST 5
  BINARY_OP *
  KW_NAMES ('dpi',)
  CALL 2
  POP_TOP
  JUMP_FORWARD L32
L31:
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + show
  CALL 0
  POP_TOP
L32:
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 10
  LOAD_CONST 14
  LOAD_CONST 0.5
  CALL 3
  BINARY_OP **
  STORE_FAST xarray
  LOAD_CONST 'dMdt'
  STORE_FAST yval
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 0
  LOAD_CONST 5
  LOAD_CONST 0.5
  CALL 3
  STORE_FAST zarray
  LOAD_CONST 'Halo Mass M$_{sol}$'
  STORE_FAST xtitle
  LOAD_CONST 'Accretion Rate M$_{sol}$ yr$^{-1}$'
  STORE_FAST ytitle
  LOAD_CONST 'z='
  STORE_FAST linelabel
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + figure
  CALL 0
  STORE_FAST fig
  LOAD_FAST fig
  LOAD_ATTR NULL|self + add_subplot
  LOAD_CONST 111
  CALL 1
  STORE_FAST ax
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xlabel
  LOAD_FAST xtitle
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_ylabel
  LOAD_FAST ytitle
  CALL 1
  POP_TOP
  LOAD_GLOBAL cm
  LOAD_ATTR NULL|self + rainbow
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + linspace
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_GLOBAL NULL + len
  LOAD_FAST zarray
  CALL 1
  CALL 3
  CALL 1
  STORE_FAST colors
  LOAD_GLOBAL NULL + enumerate
  LOAD_FAST zarray
  CALL 1
  GET_ITER
L33:
  FOR_ITER L34
  UNPACK_SEQUENCE 2
  STORE_FAST zind
  STORE_FAST zval
  LOAD_GLOBAL commah
  LOAD_ATTR NULL|self + run
  LOAD_FAST cosmology
  LOAD_FAST zval
  LOAD_FAST xarray
  LOAD_CONST False
  LOAD_CONST True
  KW_NAMES ('cosmology', 'zi', 'Mi', 'com', 'mah')
  CALL 5
  STORE_FAST output
  LOAD_FAST output
  LOAD_FAST yval
  BINARY_SUBSCR
  LOAD_ATTR NULL|self + flatten
  CALL 0
  STORE_FAST yarray
  LOAD_FAST ax
  LOAD_ATTR NULL|self + plot
  LOAD_FAST xarray
  LOAD_FAST yarray
  LOAD_FAST linelabel
  LOAD_GLOBAL NULL + str
  LOAD_FAST zval
  CALL 1
  BINARY_OP +
  LOAD_FAST colors
  LOAD_FAST zind
  BINARY_SUBSCR
  KW_NAMES ('label', 'color')
  CALL 4
  POP_TOP
  JUMP_BACKWARD L33
L34:
  END_FOR
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xscale
  LOAD_CONST 'log'
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_yscale
  LOAD_CONST 'log'
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + legend
  LOAD_CONST 2
  KW_NAMES ('loc',)
  CALL 1
  STORE_FAST leg
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_alpha
  LOAD_CONST 0
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_edgecolor
  LOAD_CONST 'white'
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_texts
  CALL 0
  GET_ITER
L35:
  FOR_ITER L36
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_fontsize
  LOAD_CONST 'small'
  CALL 1
  POP_TOP
  JUMP_BACKWARD L35
L36:
  END_FOR
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_lines
  CALL 0
  GET_ITER
L37:
  FOR_ITER L38
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_linewidth
  LOAD_CONST 4
  CALL 1
  POP_TOP
  JUMP_BACKWARD L37
L38:
  END_FOR
  LOAD_FAST plotname
  POP_JUMP_IF_FALSE L39
  LOAD_FAST fig
  LOAD_ATTR NULL|self + tight_layout
  LOAD_CONST 0.2
  KW_NAMES ('pad',)
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST "Plotting to '%s_MAH_M_relation.png'"
  LOAD_FAST plotname
  BINARY_OP %
  CALL 1
  POP_TOP
  LOAD_FAST fig
  LOAD_ATTR NULL|self + savefig
  LOAD_FAST plotname
  LOAD_CONST '_MAH_M_relation.png'
  BINARY_OP +
  LOAD_FAST fig
  LOAD_ATTR dpi
  LOAD_CONST 5
  BINARY_OP *
  KW_NAMES ('dpi',)
  CALL 2
  POP_TOP
  JUMP_FORWARD L40
L39:
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + show
  CALL 0
  POP_TOP
L40:
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 10
  LOAD_CONST 14
  LOAD_CONST 0.5
  CALL 3
  BINARY_OP **
  STORE_FAST xarray
  LOAD_CONST 'dMdt'
  STORE_FAST yval
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 0
  LOAD_CONST 5
  LOAD_CONST 0.5
  CALL 3
  STORE_FAST zarray
  LOAD_CONST 'Halo Mass M$_{sol}$'
  STORE_FAST xtitle
  LOAD_CONST 'Specific Accretion Rate yr$^{-1}$'
  STORE_FAST ytitle
  LOAD_CONST 'z='
  STORE_FAST linelabel
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + figure
  CALL 0
  STORE_FAST fig
  LOAD_FAST fig
  LOAD_ATTR NULL|self + add_subplot
  LOAD_CONST 111
  CALL 1
  STORE_FAST ax
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xlabel
  LOAD_FAST xtitle
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_ylabel
  LOAD_FAST ytitle
  CALL 1
  POP_TOP
  LOAD_GLOBAL cm
  LOAD_ATTR NULL|self + rainbow
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + linspace
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_GLOBAL NULL + len
  LOAD_FAST zarray
  CALL 1
  CALL 3
  CALL 1
  STORE_FAST colors
  LOAD_GLOBAL NULL + enumerate
  LOAD_FAST zarray
  CALL 1
  GET_ITER
L41:
  FOR_ITER L42
  UNPACK_SEQUENCE 2
  STORE_FAST zind
  STORE_FAST zval
  LOAD_GLOBAL commah
  LOAD_ATTR NULL|self + run
  LOAD_FAST cosmology
  LOAD_FAST zval
  LOAD_FAST xarray
  LOAD_CONST True
  LOAD_CONST False
  KW_NAMES ('cosmology', 'zi', 'Mi', 'mah', 'com')
  CALL 5
  STORE_FAST output
  LOAD_FAST output
  LOAD_FAST yval
  BINARY_SUBSCR
  LOAD_ATTR NULL|self + flatten
  CALL 0
  STORE_FAST yarray
  LOAD_FAST ax
  LOAD_ATTR NULL|self + plot
  LOAD_FAST xarray
  LOAD_FAST yarray
  LOAD_FAST xarray
  BINARY_OP /
  LOAD_FAST linelabel
  LOAD_GLOBAL NULL + str
  LOAD_FAST zval
  CALL 1
  BINARY_OP +
  LOAD_FAST colors
  LOAD_FAST zind
  BINARY_SUBSCR
  KW_NAMES ('label', 'color')
  CALL 4
  POP_TOP
  JUMP_BACKWARD L41
L42:
  END_FOR
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xscale
  LOAD_CONST 'log'
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_yscale
  LOAD_CONST 'log'
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + legend
  LOAD_CONST 1
  KW_NAMES ('loc',)
  CALL 1
  STORE_FAST leg
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_alpha
  LOAD_CONST 0
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_edgecolor
  LOAD_CONST 'white'
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_texts
  CALL 0
  GET_ITER
L43:
  FOR_ITER L44
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_fontsize
  LOAD_CONST 'small'
  CALL 1
  POP_TOP
  JUMP_BACKWARD L43
L44:
  END_FOR
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_lines
  CALL 0
  GET_ITER
L45:
  FOR_ITER L46
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_linewidth
  LOAD_CONST 4
  CALL 1
  POP_TOP
  JUMP_BACKWARD L45
L46:
  END_FOR
  LOAD_FAST plotname
  POP_JUMP_IF_FALSE L47
  LOAD_FAST fig
  LOAD_ATTR NULL|self + tight_layout
  LOAD_CONST 0.2
  KW_NAMES ('pad',)
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST "Plotting to '%s_specificMAH_M_relation.png'"
  LOAD_FAST plotname
  BINARY_OP %
  CALL 1
  POP_TOP
  LOAD_FAST fig
  LOAD_ATTR NULL|self + savefig
  LOAD_FAST plotname
  LOAD_CONST '_specificMAH_M_relation.png'
  BINARY_OP +
  LOAD_FAST fig
  LOAD_ATTR dpi
  LOAD_CONST 5
  BINARY_OP *
  KW_NAMES ('dpi',)
  CALL 2
  POP_TOP
  JUMP_FORWARD L48
L47:
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + show
  CALL 0
  POP_TOP
L48:
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_CONST 0.05
  CALL 3
  BINARY_OP **
  LOAD_CONST 1
  BINARY_OP -
  STORE_FAST xarray
  LOAD_CONST 'Mz'
  STORE_FAST yval
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 10
  LOAD_CONST 14
  LOAD_CONST 0.5
  CALL 3
  BINARY_OP **
  STORE_FAST zarray
  LOAD_CONST 'Redshift'
  STORE_FAST xtitle
  LOAD_CONST 'M(z) (M$_{sol}$)'
  STORE_FAST ytitle
  LOAD_CONST 'log$_{10}$ M$_{0}$(M$_{sol}$)='
  STORE_FAST linelabel
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + figure
  CALL 0
  STORE_FAST fig
  LOAD_FAST fig
  LOAD_ATTR NULL|self + add_subplot
  LOAD_CONST 111
  CALL 1
  STORE_FAST ax
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xlabel
  LOAD_FAST xtitle
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_ylabel
  LOAD_FAST ytitle
  CALL 1
  POP_TOP
  LOAD_GLOBAL cm
  LOAD_ATTR NULL|self + rainbow
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + linspace
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_GLOBAL NULL + len
  LOAD_FAST zarray
  CALL 1
  CALL 3
  CALL 1
  STORE_FAST colors
  LOAD_GLOBAL NULL + enumerate
  LOAD_FAST zarray
  CALL 1
  GET_ITER
L49:
  FOR_ITER L50
  UNPACK_SEQUENCE 2
  STORE_FAST zind
  STORE_FAST zval
  LOAD_GLOBAL commah
  LOAD_ATTR NULL|self + run
  LOAD_FAST cosmology
  LOAD_CONST 0
  LOAD_FAST zval
  LOAD_FAST xarray
  KW_NAMES ('cosmology', 'zi', 'Mi', 'z')
  CALL 4
  STORE_FAST output
  LOAD_FAST output
  LOAD_FAST yval
  BINARY_SUBSCR
  LOAD_ATTR NULL|self + flatten
  CALL 0
  STORE_FAST yarray
  LOAD_FAST ax
  LOAD_ATTR NULL|self + plot
  LOAD_FAST xarray
  LOAD_FAST yarray
  LOAD_FAST linelabel
  LOAD_CONST '{0:.1f}'
  LOAD_ATTR NULL|self + format
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + log10
  LOAD_FAST zval
  CALL 1
  CALL 1
  BINARY_OP +
  LOAD_FAST colors
  LOAD_FAST zind
  BINARY_SUBSCR
  KW_NAMES ('label', 'color')
  CALL 4
  POP_TOP
  JUMP_BACKWARD L49
L50:
  END_FOR
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_yscale
  LOAD_CONST 'log'
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + legend
  LOAD_CONST 1
  KW_NAMES ('loc',)
  CALL 1
  STORE_FAST leg
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_alpha
  LOAD_CONST 0
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_edgecolor
  LOAD_CONST 'white'
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_texts
  CALL 0
  GET_ITER
L51:
  FOR_ITER L52
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_fontsize
  LOAD_CONST 'small'
  CALL 1
  POP_TOP
  JUMP_BACKWARD L51
L52:
  END_FOR
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_lines
  CALL 0
  GET_ITER
L53:
  FOR_ITER L54
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_linewidth
  LOAD_CONST 4
  CALL 1
  POP_TOP
  JUMP_BACKWARD L53
L54:
  END_FOR
  LOAD_FAST plotname
  POP_JUMP_IF_FALSE L55
  LOAD_FAST fig
  LOAD_ATTR NULL|self + tight_layout
  LOAD_CONST 0.2
  KW_NAMES ('pad',)
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST "Plotting to '%s_Mzz_relation.png'"
  LOAD_FAST plotname
  BINARY_OP %
  CALL 1
  POP_TOP
  LOAD_FAST fig
  LOAD_ATTR NULL|self + savefig
  LOAD_FAST plotname
  LOAD_CONST '_Mzz_relation.png'
  BINARY_OP +
  LOAD_FAST fig
  LOAD_ATTR dpi
  LOAD_CONST 5
  BINARY_OP *
  KW_NAMES ('dpi',)
  CALL 2
  POP_TOP
  JUMP_FORWARD L56
L55:
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + show
  CALL 0
  POP_TOP
L56:
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_CONST 0.02
  CALL 3
  BINARY_OP **
  LOAD_CONST 1
  BINARY_OP -
  STORE_FAST xarray
  LOAD_CONST 'Mz'
  STORE_FAST yval
  LOAD_CONST 10
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + arange
  LOAD_CONST 10
  LOAD_CONST 14
  LOAD_CONST 0.5
  CALL 3
  BINARY_OP **
  STORE_FAST zarray
  LOAD_CONST 'Redshift'
  STORE_FAST xtitle
  LOAD_CONST 'log$_{10}$ M(z)/M$_{0}$'
  STORE_FAST ytitle
  LOAD_CONST 'log$_{10}$ M$_{0}$(M$_{sol}$)='
  STORE_FAST linelabel
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + figure
  CALL 0
  STORE_FAST fig
  LOAD_FAST fig
  LOAD_ATTR NULL|self + add_subplot
  LOAD_CONST 111
  CALL 1
  STORE_FAST ax
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_xlabel
  LOAD_FAST xtitle
  CALL 1
  POP_TOP
  LOAD_FAST ax
  LOAD_ATTR NULL|self + set_ylabel
  LOAD_FAST ytitle
  CALL 1
  POP_TOP
  LOAD_GLOBAL cm
  LOAD_ATTR NULL|self + rainbow
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + linspace
  LOAD_CONST 0
  LOAD_CONST 1
  LOAD_GLOBAL NULL + len
  LOAD_FAST zarray
  CALL 1
  CALL 3
  CALL 1
  STORE_FAST colors
  LOAD_GLOBAL NULL + enumerate
  LOAD_FAST zarray
  CALL 1
  GET_ITER
L57:
  FOR_ITER L58
  UNPACK_SEQUENCE 2
  STORE_FAST zind
  STORE_FAST zval
  LOAD_GLOBAL commah
  LOAD_ATTR NULL|self + run
  LOAD_FAST cosmology
  LOAD_CONST 0
  LOAD_FAST zval
  LOAD_FAST xarray
  KW_NAMES ('cosmology', 'zi', 'Mi', 'z')
  CALL 4
  STORE_FAST output
  LOAD_FAST output
  LOAD_FAST yval
  BINARY_SUBSCR
  LOAD_ATTR NULL|self + flatten
  CALL 0
  STORE_FAST yarray
  LOAD_FAST ax
  LOAD_ATTR NULL|self + plot
  LOAD_FAST xarray
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + log10
  LOAD_FAST yarray
  LOAD_FAST zval
  BINARY_OP /
  CALL 1
  LOAD_FAST linelabel
  LOAD_CONST '{0:.1f}'
  LOAD_ATTR NULL|self + format
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + log10
  LOAD_FAST zval
  CALL 1
  CALL 1
  BINARY_OP +
  LOAD_FAST colors
  LOAD_FAST zind
  BINARY_SUBSCR
  KW_NAMES ('label', 'color')
  CALL 4
  POP_TOP
  JUMP_BACKWARD L57
L58:
  END_FOR
  LOAD_FAST ax
  LOAD_ATTR NULL|self + legend
  LOAD_CONST 3
  KW_NAMES ('loc',)
  CALL 1
  STORE_FAST leg
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_alpha
  LOAD_CONST 0
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_frame
  CALL 0
  LOAD_ATTR NULL|self + set_edgecolor
  LOAD_CONST 'white'
  CALL 1
  POP_TOP
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_texts
  CALL 0
  GET_ITER
L59:
  FOR_ITER L60
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_fontsize
  LOAD_CONST 'small'
  CALL 1
  POP_TOP
  JUMP_BACKWARD L59
L60:
  END_FOR
  LOAD_FAST leg
  LOAD_ATTR NULL|self + get_lines
  CALL 0
  GET_ITER
L61:
  FOR_ITER L62
  STORE_FAST label
  LOAD_FAST label
  LOAD_ATTR NULL|self + set_linewidth
  LOAD_CONST 4
  CALL 1
  POP_TOP
  JUMP_BACKWARD L61
L62:
  END_FOR
  LOAD_FAST plotname
  POP_JUMP_IF_FALSE L63
  LOAD_FAST fig
  LOAD_ATTR NULL|self + tight_layout
  LOAD_CONST 0.2
  KW_NAMES ('pad',)
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST "Plotting to '%s_MzM0z_relation.png'"
  LOAD_FAST plotname
  BINARY_OP %
  CALL 1
  POP_TOP
  LOAD_FAST fig
  LOAD_ATTR NULL|self + savefig
  LOAD_FAST plotname
  LOAD_CONST '_MzM0z_relation.png'
  BINARY_OP +
  LOAD_FAST fig
  LOAD_ATTR dpi
  LOAD_CONST 5
  BINARY_OP *
  KW_NAMES ('dpi',)
  CALL 2
  POP_TOP
  RETURN_CONST 'Done'
L63:
  LOAD_GLOBAL plt
  LOAD_ATTR NULL|self + show
  CALL 0
  POP_TOP
  RETURN_CONST 'Done'
END

def plotcommand(cosmology='WMAP5', plotname=None):
    """pass"""
    xarray = 10 ** np.arange(1, 15, 0.2)
    yval = 'c'
    zarray = np.arange(0, 5, 0.5)
    xtitle = 'Halo Mass (M$_{sol}$)'
    ytitle = 'Concentration'
    linelabel = 'z='
    fig = plt.figure()
    ax = fig.add_subplot(111)
    ax.set_xlabel(xtitle)
    ax.set_ylabel(ytitle)
    plt.ylim([2, 30])
    colors = cm.rainbow(np.linspace(0, 1, len(zarray)))
    for zind, zval in enumerate(zarray):
        output = commah.run(cosmology=cosmology, zi=zval, Mi=xarray)
        yarray = output[yval].flatten()
        ax.plot(xarray, yarray, label=linelabel + str(zval), color=colors[zind])
        ax.plot(xarray, commah.commah.cduffy(zval, xarray), color='black')
    ax.set_xscale('log')
    ax.set_yscale('log')
    leg = ax.legend(loc=1)
    leg.get_frame().set_alpha(0)
    leg.get_frame().set_edgecolor('white')
    for label in leg.get_texts():
        label.set_fontsize('small')
    for label in leg.get_lines():
        label.set_linewidth(4)
    if plotname:
        fig.tight_layout(pad=0.2)
        print("Plotting to '%s_CM_relation.png'" % plotname)
        fig.savefig(plotname + '_CM_relation.png', dpi=fig.dpi * 5)
    else:
        plt.show()
    xarray = 10 ** np.arange(0, 1, 0.05) - 1
    yval = 'c'
    zarray = 10 ** np.arange(6, 14, 2)
    xtitle = 'Redshift'
    ytitle = 'NFW Concentration'
    linelabel = 'log$_{10}$ M$_{z}$(M$_{sol}$)='
    fig = plt.figure()
    ax = fig.add_subplot(111)
    ax.set_xlabel(xtitle)
    ax.set_ylabel(ytitle)
    colors = cm.rainbow(np.linspace(0, 1, len(zarray)))
    for zind, zval in enumerate(zarray):
        output = commah.run(cosmology=cosmology, zi=xarray, Mi=zval)
        yarray = output[yval].flatten()
        ax.plot(xarray, yarray, label=linelabel + '{0:.1f}'.format(np.log10(zval)), color=colors[zind])
    leg = ax.legend(loc=1)
    leg.get_frame().set_alpha(0)
    leg.get_frame().set_edgecolor('white')
    for label in leg.get_texts():
        label.set_fontsize('small')
    for label in leg.get_lines():
        label.set_linewidth(4)
    if plotname:
        fig.tight_layout(pad=0.2)
        print("Plotting to '%s_Cz_relation.png'" % plotname)
        fig.savefig(plotname + '_Cz_relation.png', dpi=fig.dpi * 5)
    else:
        plt.show()
    xarray = 10 ** np.arange(0, 1, 0.05) - 1
    yval = 'zf'
    zarray = 10 ** np.arange(6, 14, 2)
    xtitle = 'Redshift'
    ytitle = 'Formation Redshift'
    linelabel = 'log$_{10}$ M$_{z}$(M$_{sol}$)='
    fig = plt.figure()
    ax = fig.add_subplot(111)
    ax.set_xlabel(xtitle)
    ax.set_ylabel(ytitle)
    colors = cm.rainbow(np.linspace(0, 1, len(zarray)))
    for zind, zval in enumerate(zarray):
        output = commah.run(cosmology=cosmology, zi=xarray, Mi=zval)
        yarray = output[yval].flatten()
        ax.plot(xarray, yarray, label=linelabel + '{0:.1f}'.format(np.log10(zval)), color=colors[zind])
    leg = ax.legend(loc=2)
    leg.get_frame().set_alpha(0)
    leg.get_frame().set_edgecolor('white')
    for label in leg.get_texts():
        label.set_fontsize('small')
    for label in leg.get_lines():
        label.set_linewidth(4)
    if plotname:
        fig.tight_layout(pad=0.2)
        print("Plotting to '%s_zfz_relation.png'" % plotname)
        fig.savefig(plotname + '_zfz_relation.png', dpi=fig.dpi * 5)
    else:
        plt.show()
    xarray = 10 ** np.arange(0, 1, 0.05) - 1
    yval = 'dMdt'
    zarray = 10 ** np.arange(10, 14, 0.5)
    xtitle = 'log$_{10}$ (1+z)'
    ytitle = 'log$_{10}$ Accretion Rate M$_{sol}$ yr$^{-1}$'
    linelabel = 'log$_{10}$ M$_z$(M$_{sol}$)='
    fig = plt.figure()
    ax = fig.add_subplot(111)
    ax.set_xlabel(xtitle)
    ax.set_ylabel(ytitle)
    colors = cm.rainbow(np.linspace(0, 1, len(zarray)))
    cosmo = commah.getcosmo(cosmology)
    for zind, zval in enumerate(zarray):
        output = commah.run(cosmology=cosmology, zi=xarray, Mi=zval, com=False, mah=True)
        yarray = output[yval].flatten()
        ax.plot(np.log10(xarray + 1.0), np.log10(yarray), label=linelabel + '{0:.1f}'.format(np.log10(zval)), color=colors[zind])
        semianalytic_approx = 71.6 * (zval / 1000000000000.0) * (cosmo['h'] / 0.7) * (-0.24 + 0.75 * (xarray + 1)) * np.sqrt(cosmo['omega_M_0'] * (xarray + 1) ** 3 + cosmo['omega_lambda_0'])
        ax.plot(np.log10(xarray + 1), np.log10(semianalytic_approx), color='black')
    leg = ax.legend(loc=2)
    leg.get_frame().set_alpha(0)
    leg.get_frame().set_edgecolor('white')
    for label in leg.get_texts():
        label.set_fontsize('small')
    for label in leg.get_lines():
        label.set_linewidth(4)
    if plotname:
        fig.tight_layout(pad=0.2)
        print("Plotting to '%s_dMdtz_relation.png'" % plotname)
        fig.savefig(plotname + '_dMdtz_relation.png', dpi=fig.dpi * 5)
    else:
        plt.show()
    xarray = 10 ** np.arange(10, 14, 0.5)
    yval = 'dMdt'
    zarray = np.arange(0, 5, 0.5)
    xtitle = 'Halo Mass M$_{sol}$'
    ytitle = 'Accretion Rate M$_{sol}$ yr$^{-1}$'
    linelabel = 'z='
    fig = plt.figure()
    ax = fig.add_subplot(111)
    ax.set_xlabel(xtitle)
    ax.set_ylabel(ytitle)
    colors = cm.rainbow(np.linspace(0, 1, len(zarray)))
    for zind, zval in enumerate(zarray):
        output = commah.run(cosmology=cosmology, zi=zval, Mi=xarray, com=False, mah=True)
        yarray = output[yval].flatten()
        ax.plot(xarray, yarray, label=linelabel + str(zval), color=colors[zind])
    ax.set_xscale('log')
    ax.set_yscale('log')
    leg = ax.legend(loc=2)
    leg.get_frame().set_alpha(0)
    leg.get_frame().set_edgecolor('white')
    for label in leg.get_texts():
        label.set_fontsize('small')
    for label in leg.get_lines():
        label.set_linewidth(4)
    if plotname:
        fig.tight_layout(pad=0.2)
        print("Plotting to '%s_MAH_M_relation.png'" % plotname)
        fig.savefig(plotname + '_MAH_M_relation.png', dpi=fig.dpi * 5)
    else:
        plt.show()
    xarray = 10 ** np.arange(10, 14, 0.5)
    yval = 'dMdt'
    zarray = np.arange(0, 5, 0.5)
    xtitle = 'Halo Mass M$_{sol}$'
    ytitle = 'Specific Accretion Rate yr$^{-1}$'
    linelabel = 'z='
    fig = plt.figure()
    ax = fig.add_subplot(111)
    ax.set_xlabel(xtitle)
    ax.set_ylabel(ytitle)
    colors = cm.rainbow(np.linspace(0, 1, len(zarray)))
    for zind, zval in enumerate(zarray):
        output = commah.run(cosmology=cosmology, zi=zval, Mi=xarray, mah=True, com=False)
        yarray = output[yval].flatten()
        ax.plot(xarray, yarray / xarray, label=linelabel + str(zval), color=colors[zind])
    ax.set_xscale('log')
    ax.set_yscale('log')
    leg = ax.legend(loc=1)
    leg.get_frame().set_alpha(0)
    leg.get_frame().set_edgecolor('white')
    for label in leg.get_texts():
        label.set_fontsize('small')
    for label in leg.get_lines():
        label.set_linewidth(4)
    if plotname:
        fig.tight_layout(pad=0.2)
        print("Plotting to '%s_specificMAH_M_relation.png'" % plotname)
        fig.savefig(plotname + '_specificMAH_M_relation.png', dpi=fig.dpi * 5)
    else:
        plt.show()
    xarray = 10 ** np.arange(0, 1, 0.05) - 1
    yval = 'Mz'
    zarray = 10 ** np.arange(10, 14, 0.5)
    xtitle = 'Redshift'
    ytitle = 'M(z) (M$_{sol}$)'
    linelabel = 'log$_{10}$ M$_{0}$(M$_{sol}$)='
    fig = plt.figure()
    ax = fig.add_subplot(111)
    ax.set_xlabel(xtitle)
    ax.set_ylabel(ytitle)
    colors = cm.rainbow(np.linspace(0, 1, len(zarray)))
    for zind, zval in enumerate(zarray):
        output = commah.run(cosmology=cosmology, zi=0, Mi=zval, z=xarray)
        yarray = output[yval].flatten()
        ax.plot(xarray, yarray, label=linelabel + '{0:.1f}'.format(np.log10(zval)), color=colors[zind])
    ax.set_yscale('log')
    leg = ax.legend(loc=1)
    leg.get_frame().set_alpha(0)
    leg.get_frame().set_edgecolor('white')
    for label in leg.get_texts():
        label.set_fontsize('small')
    for label in leg.get_lines():
        label.set_linewidth(4)
    if plotname:
        fig.tight_layout(pad=0.2)
        print("Plotting to '%s_Mzz_relation.png'" % plotname)
        fig.savefig(plotname + '_Mzz_relation.png', dpi=fig.dpi * 5)
    else:
        plt.show()
    xarray = 10 ** np.arange(0, 1, 0.02) - 1
    yval = 'Mz'
    zarray = 10 ** np.arange(10, 14, 0.5)
    xtitle = 'Redshift'
    ytitle = 'log$_{10}$ M(z)/M$_{0}$'
    linelabel = 'log$_{10}$ M$_{0}$(M$_{sol}$)='
    fig = plt.figure()
    ax = fig.add_subplot(111)
    ax.set_xlabel(xtitle)
    ax.set_ylabel(ytitle)
    colors = cm.rainbow(np.linspace(0, 1, len(zarray)))
    for zind, zval in enumerate(zarray):
        output = commah.run(cosmology=cosmology, zi=0, Mi=zval, z=xarray)
        yarray = output[yval].flatten()
        ax.plot(xarray, np.log10(yarray / zval), label=linelabel + '{0:.1f}'.format(np.log10(zval)), color=colors[zind])
    leg = ax.legend(loc=3)
    leg.get_frame().set_alpha(0)
    leg.get_frame().set_edgecolor('white')
    for label in leg.get_texts():
        label.set_fontsize('small')
    for label in leg.get_lines():
        label.set_linewidth(4)
    if plotname:
        fig.tight_layout(pad=0.2)
        print("Plotting to '%s_MzM0z_relation.png'" % plotname)
        fig.savefig(plotname + '_MzM0z_relation.png', dpi=fig.dpi * 5)
    else:
        plt.show()
    return 'Done'


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code add_transformers>
  MAKE_FUNCTION 0
  STORE_NAME add_transformers
  RETURN_CONST None
END
CODE add_transformers(line)
  DOC 'pass'
  RESUME 0
  LOAD_GLOBAL FROM_EXPERIMENTAL
  LOAD_ATTR NULL|self + match
  LOAD_FAST line
  CALL 1
  POP_JUMP_IF_TRUE L1
  LOAD_ASSERTION_ERROR
  RAISE_VARARGS 1
L1:
  LOAD_GLOBAL FROM_EXPERIMENTAL
  LOAD_ATTR NULL|self + sub
  LOAD_CONST ' '
  LOAD_FAST line
  CALL 2
  STORE_FAST line
  LOAD_FAST line
  LOAD_ATTR NULL|self + split
  LOAD_CONST '#'
  CALL 1
  LOAD_CONST 0
  BINARY_SUBSCR
  STORE_FAST line
  LOAD_FAST line
  LOAD_ATTR NULL|self + replace
  LOAD_CONST ' '
  LOAD_CONST ''
  CALL 2
  LOAD_ATTR NULL|self + split
  LOAD_CONST ','
  CALL 1
  GET_ITER
L2:
  FOR_ITER L3
  STORE_FAST trans
  LOAD_GLOBAL NULL + import_transformer
  LOAD_FAST trans
  CALL 1
  POP_TOP
  JUMP_BACKWARD L2
L3:
  END_FOR
  RETURN_CONST None
END

def add_transformers(line):
    """pass"""
    assert FROM_EXPERIMENTAL.match(line)
    line = FROM_EXPERIMENTAL.sub(' ', line)
    line = line.split('#')[0]
    for trans in line.replace(' ', '').split(','):
        import_transformer(trans)

code-search-net/code_search_net (python, train split)


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code import_transformer>
  MAKE_FUNCTION 0
  STORE_NAME import_transformer
  RETURN_CONST None
END
CODE import_transformer(name)
  DOC 'pass'
  RESUME 0
  LOAD_FAST name
  LOAD_GLOBAL transformers
  CONTAINS_OP 0
  POP_JUMP_IF_FALSE L1
  LOAD_GLOBAL transformers
  LOAD_FAST name
  BINARY_SUBSCR
  RETURN_VALUE
L1:
  LOAD_GLOBAL sys
  LOAD_ATTR meta_path
  LOAD_CONST 0
  BINARY_SUBSCR
  STORE_FAST hook
  LOAD_GLOBAL sys
  LOAD_ATTR meta_path
  LOAD_CONST 1
  LOAD_CONST None
  BINARY_SLICE
  LOAD_GLOBAL sys
  STORE_ATTR meta_path
  NOP
L2:
  LOAD_GLOBAL NULL + __import__
  LOAD_FAST name
  CALL 1
  LOAD_GLOBAL transformers
  LOAD_FAST name
  STORE_SUBSCR
  LOAD_GLOBAL CONSOLE_ACTIVE
  POP_JUMP_IF_FALSE L3
  LOAD_GLOBAL NULL + hasattr
  LOAD_GLOBAL transformers
  LOAD_FAST name
  BINARY_SUBSCR
  LOAD_CONST 'NO_CONSOLE'
  CALL 2
  POP_JUMP_IF_FALSE L3
  LOAD_GLOBAL NULL + print
  LOAD_GLOBAL transformers
  LOAD_FAST name
  BINARY_SUBSCR
  LOAD_ATTR NO_CONSOLE
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + NullTransformer
  CALL 0
  LOAD_GLOBAL transformers
  LOAD_FAST name
  STORE_SUBSCR
L3:
  LOAD_GLOBAL sys
  LOAD_ATTR meta_path
  LOAD_ATTR NULL|self + insert
  LOAD_CONST 0
  LOAD_FAST hook
  CALL 2
  POP_TOP
  LOAD_GLOBAL transformers
  LOAD_FAST name
  BINARY_SUBSCR
  RETURN_VALUE
L4:
  PUSH_EXC_INFO
  LOAD_GLOBAL ImportError
  CHECK_EXC_MATCH
  POP_JUMP_IF_FALSE L6
  POP_TOP
  LOAD_GLOBAL sys
  LOAD_ATTR stderr
  LOAD_ATTR NULL|self + write
  LOAD_CONST 'Warning: Import Error in add_transformers: %s not found\n'
  LOAD_FAST name
  BINARY_OP %
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + NullTransformer
  CALL 0
  LOAD_GLOBAL transformers
  LOAD_FAST name
  STORE_SUBSCR
L5:
  POP_EXCEPT
  JUMP_BACKWARD L3
L6:
  LOAD_GLOBAL Exception
  CHECK_EXC_MATCH
  POP_JUMP_IF_FALSE L10
  STORE_FAST e
L7:
  LOAD_GLOBAL sys
  LOAD_ATTR stderr
  LOAD_ATTR NULL|self + write
  LOAD_CONST 'Unexpected exception in transforms.import_transformer%s\n '
  LOAD_FAST e
  LOAD_ATTR __class__
  LOAD_ATTR __name__
  BINARY_OP %
  CALL 1
  POP_TOP
L8:
  POP_EXCEPT
  LOAD_CONST None
  STORE_FAST e
  DELETE_FAST e
  JUMP_BACKWARD L3
L9:
  LOAD_CONST None
  STORE_FAST e
  DELETE_FAST e
  RERAISE 1
L10:
  RERAISE 0
L11:
  COPY 3
  POP_EXCEPT
  RERAISE 1
L12:
  PUSH_EXC_INFO
  LOAD_GLOBAL sys
  LOAD_ATTR meta_path
  LOAD_ATTR NULL|self + insert
  LOAD_CONST 0
  LOAD_FAST hook
  CALL 2
  POP_TOP
  RERAISE 0
L13:
  COPY 3
  POP_EXCEPT
  RERAISE 1
  EXC try=L2..L3 -> handler=L4 depth=0 lasti=False
  EXC try=L4..L5 -> handler=L11 depth=1 lasti=True
  EXC try=L5..L6 -> handler=L12 depth=0 lasti=False
  EXC try=L6..L7 -> handler=L11 depth=1 lasti=True
  EXC try=L7..L8 -> handler=L9 depth=1 lasti=True
  EXC try=L8..L9 -> handler=L12 depth=0 lasti=False
  EXC try=L9..L11 -> handler=L11 depth=1 lasti=True
  EXC try=L11..L12 -> handler=L12 depth=0 lasti=False
  EXC try=L12..L13 -> handler=L13 depth=1 lasti=True
END

def import_transformer(name):
    """pass"""
    if name in transformers:
        return transformers[name]
    hook = sys.meta_path[0]
    sys.meta_path = sys.meta_path[1:]
    try:
        transformers[name] = __import__(name)
        if CONSOLE_ACTIVE:
            if hasattr(transformers[name], 'NO_CONSOLE'):
                print(transformers[name].NO_CONSOLE)
                transformers[name] = NullTransformer()
    except ImportError:
        sys.stderr.write('Warning: Import Error in add_transformers: %s not found\n' % name)
        transformers[name] = NullTransformer()
    except Exception as e:
        sys.stderr.write('Unexpected exception in transforms.import_transformer%s\n ' % e.__class__.__name__)
    finally:
        sys.meta_path.insert(0, hook)
    return transformers[name]


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code extract_transformers_from_source>
  MAKE_FUNCTION 0
  STORE_NAME extract_transformers_from_source
  RETURN_CONST None
END
CODE extract_transformers_from_source(source)
  DOC 'pass'
  RESUME 0
  LOAD_FAST source
  LOAD_ATTR NULL|self + split
  LOAD_CONST '\n'
  CALL 1
  STORE_FAST lines
  BUILD_LIST 0
  STORE_FAST linenumbers
  LOAD_GLOBAL NULL + enumerate
  LOAD_FAST lines
  CALL 1
  GET_ITER
L1:
  FOR_ITER L3
  UNPACK_SEQUENCE 2
  STORE_FAST number
  STORE_FAST line
  LOAD_GLOBAL FROM_EXPERIMENTAL
  LOAD_ATTR NULL|self + match
  LOAD_FAST line
  CALL 1
  POP_JUMP_IF_TRUE L2
  JUMP_BACKWARD L1
L2:
  LOAD_GLOBAL NULL + add_transformers
  LOAD_FAST line
  CALL 1
  POP_TOP
  LOAD_FAST linenumbers
  LOAD_ATTR NULL|self + insert
  LOAD_CONST 0
  LOAD_FAST number
  CALL 2
  POP_TOP
  JUMP_BACKWARD L1
L3:
  END_FOR
  LOAD_FAST linenumbers
  GET_ITER
L4:
  FOR_ITER L5
  STORE_FAST number
  LOAD_FAST lines
  LOAD_FAST number
  DELETE_SUBSCR
  JUMP_BACKWARD L4
L5:
  END_FOR
  LOAD_CONST '\n'
  LOAD_ATTR NULL|self + join
  LOAD_FAST lines
  CALL 1
  RETURN_VALUE
END

def extract_transformers_from_source(source):
    """pass"""
    lines = source.split('\n')
    linenumbers = []
    for number, line in enumerate(lines):
        if FROM_EXPERIMENTAL.match(line):
            add_transformers(line)
            linenumbers.insert(0, number)
    for number in linenumbers:
        del lines[number]
    return '\n'.join(lines)


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code remove_not_allowed_in_console>
  MAKE_FUNCTION 0
  STORE_NAME remove_not_allowed_in_console
  RETURN_CONST None
END
CODE remove_not_allowed_in_console()
  DOC 'pass'
  RESUME 0
  BUILD_LIST 0
  STORE_FAST not_allowed_in_console
  LOAD_GLOBAL CONSOLE_ACTIVE
  POP_JUMP_IF_FALSE L6
  LOAD_GLOBAL transformers
  GET_ITER
L1:
  FOR_ITER L3
  STORE_FAST name
  LOAD_GLOBAL NULL + import_transformer
  LOAD_FAST name
  CALL 1
  STORE_FAST tr_module
  LOAD_GLOBAL NULL + hasattr
  LOAD_FAST tr_module
  LOAD_CONST 'NO_CONSOLE'
  CALL 2
  POP_JUMP_IF_TRUE L2
  JUMP_BACKWARD L1
L2:
  LOAD_FAST not_allowed_in_console
  LOAD_ATTR NULL|self + append
  LOAD_FAST name
  LOAD_FAST tr_module
  BUILD_TUPLE 2
  CALL 1
  POP_TOP
  JUMP_BACKWARD L1
L3:
  END_FOR
  LOAD_FAST not_allowed_in_console
  GET_ITER
L4:
  FOR_ITER L5
  UNPACK_SEQUENCE 2
  STORE_FAST name
  STORE_FAST tr_module
  LOAD_GLOBAL NULL + print
  LOAD_FAST tr_module
  LOAD_ATTR NO_CONSOLE
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + NullTransformer
  CALL 0
  LOAD_GLOBAL transformers
  LOAD_FAST name
  STORE_SUBSCR
  JUMP_BACKWARD L4
L5:
  END_FOR
  RETURN_CONST None
L6:
  RETURN_CONST None
END

def remove_not_allowed_in_console():
    """pass"""
    not_allowed_in_console = []
    if CONSOLE_ACTIVE:
        for name in transformers:
            tr_module = import_transformer(name)
            if hasattr(tr_module, 'NO_CONSOLE'):
                not_allowed_in_console.append((name, tr_module))
        for name, tr_module in not_allowed_in_console:
            print(tr_module.NO_CONSOLE)
            transformers[name] = NullTransformer()


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code _match>
  MAKE_FUNCTION 0
  STORE_NAME _match
  RETURN_CONST None
END
CODE _match(self, request, response)
  DOC 'pass'
  RESUME 0
  LOAD_CONST 'text/html'
  LOAD_FAST response
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'Content-Type'
  LOAD_CONST ''
  CALL 2
  CONTAINS_OP 0
  STORE_FAST is_html
  LOAD_FAST is_html
  POP_JUMP_IF_FALSE L2
  LOAD_GLOBAL NULL + hasattr
  LOAD_FAST response
  LOAD_CONST 'rendered_content'
  CALL 2
  POP_JUMP_IF_FALSE L2
  LOAD_GLOBAL PATH_MATCHER
  LOAD_ATTR NULL|self + match
  LOAD_FAST request
  LOAD_ATTR path
  CALL 1
  LOAD_CONST None
  IS_OP 1
  STORE_FAST correct_path
  LOAD_FAST self
  LOAD_ATTR include_flag
  LOAD_FAST response
  LOAD_ATTR rendered_content
  CONTAINS_OP 1
  STORE_FAST not_included
  LOAD_FAST correct_path
  COPY 1
  POP_JUMP_IF_FALSE L1
  POP_TOP
  LOAD_FAST not_included
L1:
  RETURN_VALUE
L2:
  RETURN_CONST False
END

def _match(self, request, response):
    """pass"""
    is_html = 'text/html' in response.get('Content-Type', '')
    if is_html and hasattr(response, 'rendered_content'):
        correct_path = PATH_MATCHER.match(request.path) is not None
        not_included = self.include_flag not in response.rendered_content
        return correct_path and not_included
    return False


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code _chosen_css>
  MAKE_FUNCTION 0
  STORE_NAME _chosen_css
  RETURN_CONST None
END
CODE _chosen_css(self)
  DOC 'pass'
  RESUME 0
  LOAD_GLOBAL NULL + render_to_string
  LOAD_FAST self
  LOAD_ATTR css_template
  BUILD_MAP 0
  CALL 2
  STORE_FAST css
  LOAD_FAST self
  LOAD_ATTR chosen_sprites
  GET_ITER
L1:
  FOR_ITER L2
  STORE_FAST sprite
  LOAD_FAST css
  LOAD_ATTR NULL|self + replace
  LOAD_FAST sprite
  LOAD_GLOBAL settings
  LOAD_ATTR STATIC_URL
  LOAD_CONST 'img/'
  BINARY_OP +
  LOAD_FAST sprite
  BINARY_OP +
  CALL 2
  STORE_FAST css
  JUMP_BACKWARD L1
L2:
  END_FOR
  LOAD_FAST css
  RETURN_VALUE
END

def _chosen_css(self):
    """pass"""
    css = render_to_string(self.css_template, {})
    for sprite in self.chosen_sprites:
        css = css.replace(sprite, settings.STATIC_URL + 'img/' + sprite)
    return css


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST
  MAKE_FUNCTION 0
  STORE_NAME _embed
  RETURN_CONST None
END
CODE _embed(self, request, response)
  DOC 'pass'
  RESUME 0
  LOAD_FAST self
  LOAD_ATTR NULL|self + _match
  LOAD_FAST request
  LOAD_FAST response
  CALL 2
  POP_JUMP_IF_FALSE L1
  LOAD_GLOBAL NULL + render_to_string
  LOAD_CONST 'chosenadmin/_head_css.html'
  LOAD_CONST 'chosen_css'
  LOAD_FAST self
  LOAD_ATTR NULL|self + _chosen_css
  CALL 0
  BUILD_MAP 1
  CALL 2
  STORE_FAST head
  LOAD_GLOBAL NULL + render_to_string
  LOAD_CONST 'chosenadmin/_script.html'
  LOAD_CONST 'chosen_js'
  LOAD_FAST self
  LOAD_ATTR NULL|self + _chosen_js
  CALL 0
  BUILD_MAP 1
  CALL 2
  STORE_FAST body
  LOAD_FAST response
  LOAD_ATTR rendered_content
  STORE_FAST content
  LOAD_FAST content
  LOAD_ATTR NULL|self + replace
  LOAD_CONST ''
  LOAD_FAST head
  CALL 2
  STORE_FAST content
  LOAD_FAST content
  LOAD_ATTR NULL|self + replace
  LOAD_CONST ''
  LOAD_FAST body
  CALL 2
  STORE_FAST content
  LOAD_FAST content
  LOAD_FAST response
  STORE_ATTR content
L1:
  LOAD_FAST response
  RETURN_VALUE
END

def _embed(self, request, response):
    """pass"""
    if self._match(request, response):
        head = render_to_string('chosenadmin/_head_css.html', {'chosen_css': self._chosen_css()})
        body = render_to_string('chosenadmin/_script.html', {'chosen_js': self._chosen_js()})
        content = response.rendered_content
        content = content.replace('', head)
        content = content.replace('', body)
        response.content = content
    return response


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code clean_up>
  MAKE_FUNCTION 0
  STORE_NAME clean_up
  RETURN_CONST None
END
CODE clean_up(self)
  DOC 'pass'
  RESUME 0
  LOAD_FAST self
  LOAD_ATTR log
  LOAD_ATTR NULL|self + debug
  LOAD_CONST 'Closing I2C bus for address: 0x%02X'
  LOAD_FAST self
  LOAD_ATTR address
  BINARY_OP %
  CALL 1
  POP_TOP
  LOAD_FAST self
  LOAD_ATTR bus
  LOAD_ATTR NULL|self + close
  CALL 0
  POP_TOP
  RETURN_CONST None
END

def clean_up(self):
    """pass"""
    self.log.debug('Closing I2C bus for address: 0x%02X' % self.address)
    self.bus.close()


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code write_quick>
  MAKE_FUNCTION 0
  STORE_NAME write_quick
  RETURN_CONST None
END
CODE write_quick(self)
  DOC 'pass'
  RESUME 0
  LOAD_FAST self
  LOAD_ATTR bus
  LOAD_ATTR NULL|self + write_quick
  LOAD_FAST self
  LOAD_ATTR address
  CALL 1
  POP_TOP
  LOAD_FAST self
  LOAD_ATTR log
  LOAD_ATTR NULL|self + debug
  LOAD_CONST 'write_quick: Sent the read / write bit'
  CALL 1
  POP_TOP
  RETURN_CONST None
END

def write_quick(self):
    """pass"""
    self.bus.write_quick(self.address)
    self.log.debug('write_quick: Sent the read / write bit')


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code write_byte>
  MAKE_FUNCTION 0
  STORE_NAME write_byte
  RETURN_CONST None
END
CODE write_byte(self, cmd, value)
  DOC 'pass'
  RESUME 0
  LOAD_FAST self
  LOAD_ATTR bus
  LOAD_ATTR NULL|self + write_byte_data
  LOAD_FAST self
  LOAD_ATTR address
  LOAD_FAST cmd
  LOAD_FAST value
  CALL 3
  POP_TOP
  LOAD_FAST self
  LOAD_ATTR log
  LOAD_ATTR NULL|self + debug
  LOAD_CONST 'write_byte: Wrote 0x%02X to command register 0x%02X'
  LOAD_FAST value
  LOAD_FAST cmd
  BUILD_TUPLE 2
  BINARY_OP %
  CALL 1
  POP_TOP
  RETURN_CONST None
END

def write_byte(self, cmd, value):
    """pass"""
    self.bus.write_byte_data(self.address, cmd, value)
    self.log.debug('write_byte: Wrote 0x%02X to command register 0x%02X' % (value, cmd))


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code write_word>
  MAKE_FUNCTION 0
  STORE_NAME write_word
  RETURN_CONST None
END
CODE write_word(self, cmd, value)
  DOC 'pass'
  RESUME 0
  LOAD_FAST self
  LOAD_ATTR bus
  LOAD_ATTR NULL|self + write_word_data
  LOAD_FAST self
  LOAD_ATTR address
  LOAD_FAST cmd
  LOAD_FAST value
  CALL 3
  POP_TOP
  LOAD_FAST self
  LOAD_ATTR log
  LOAD_ATTR NULL|self + debug
  LOAD_CONST 'write_word: Wrote 0x%04X to command register 0x%02X'
  LOAD_FAST value
  LOAD_FAST cmd
  BUILD_TUPLE 2
  BINARY_OP %
  CALL 1
  POP_TOP
  RETURN_CONST None
END

def write_word(self, cmd, value):
    """pass"""
    self.bus.write_word_data(self.address, cmd, value)
    self.log.debug('write_word: Wrote 0x%04X to command register 0x%02X' % (value, cmd))


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code write_raw_byte>
  MAKE_FUNCTION 0
  STORE_NAME write_raw_byte
  RETURN_CONST None
END
CODE write_raw_byte(self, value)
  DOC 'pass'
  RESUME 0
  LOAD_FAST self
  LOAD_ATTR bus
  LOAD_ATTR NULL|self + write_byte
  LOAD_FAST self
  LOAD_ATTR address
  LOAD_FAST value
  CALL 2
  POP_TOP
  LOAD_FAST self
  LOAD_ATTR log
  LOAD_ATTR NULL|self + debug
  LOAD_CONST 'write_raw_byte: Wrote 0x%02X'
  LOAD_FAST value
  BINARY_OP %
  CALL 1
  POP_TOP
  RETURN_CONST None
END

def write_raw_byte(self, value):
    """pass"""
    self.bus.write_byte(self.address, value)
    self.log.debug('write_raw_byte: Wrote 0x%02X' % value)


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code write_block_data>
  MAKE_FUNCTION 0
  STORE_NAME write_block_data
  RETURN_CONST None
END
CODE write_block_data(self, cmd, block)
  DOC 'pass'
  RESUME 0
  LOAD_FAST self
  LOAD_ATTR bus
  LOAD_ATTR NULL|self + write_i2c_block_data
  LOAD_FAST self
  LOAD_ATTR address
  LOAD_FAST cmd
  LOAD_FAST block
  CALL 3
  POP_TOP
  LOAD_FAST self
  LOAD_ATTR log
  LOAD_ATTR NULL|self + debug
  LOAD_CONST 'write_block_data: Wrote [%s] to command register 0x%02X'
  LOAD_CONST ', '
  LOAD_ATTR NULL|self + join
  LOAD_FAST block
  GET_ITER
  LOAD_FAST_AND_CLEAR x
  SWAP 2
L1:
  BUILD_LIST 0
  SWAP 2
L2:
  FOR_ITER L3
  STORE_FAST x
  LOAD_CONST '0x%02X'
  LOAD_FAST x
  BINARY_OP %
  LIST_APPEND 2
  JUMP_BACKWARD L2
L3:
  END_FOR
L4:
  SWAP 2
  STORE_FAST x
  CALL 1
  LOAD_FAST cmd
  BUILD_TUPLE 2
  BINARY_OP %
  CALL 1
  POP_TOP
  RETURN_CONST None
L5:
  SWAP 2
  POP_TOP
  SWAP 2
  STORE_FAST x
  RERAISE 0
  EXC try=L1..L4 -> handler=L5 depth=7 lasti=False
END

def write_block_data(self, cmd, block):
    """pass"""
    self.bus.write_i2c_block_data(self.address, cmd, block)
    self.log.debug('write_block_data: Wrote [%s] to command register 0x%02X' % (', '.join(['0x%02X' % x for x in block]), cmd))


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (None,)
  LOAD_CONST <code get_formset>
  MAKE_FUNCTION defaults
  STORE_NAME get_formset
  RETURN_CONST None
END
CODE get_formset(self, request, obj, **kwargs)
  DOC 'pass'
  RESUME 0
  PUSH_NULL
  LOAD_GLOBAL NULL + super
  CALL 0
  LOAD_ATTR get_formset
  LOAD_FAST request
  LOAD_FAST obj
  BUILD_TUPLE 2
  BUILD_MAP 0
  LOAD_FAST kwargs
  DICT_MERGE 1
  CALL_FUNCTION_EX 1
  STORE_FAST data
  LOAD_FAST obj
  POP_JUMP_IF_FALSE L1
  LOAD_FAST request
  LOAD_ATTR user
  LOAD_ATTR id
  LOAD_FAST data
  LOAD_ATTR form
  LOAD_ATTR base_fields
  LOAD_CONST 'user'
  BINARY_SUBSCR
  STORE_ATTR initial
L1:
  LOAD_FAST data
  RETURN_VALUE
END

def get_formset(self, request, obj=None, **kwargs):
    """pass"""
    data = super().get_formset(request, obj, **kwargs)
    if obj:
        data.form.base_fields['user'].initial = request.user.id
    return data


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (None,)
  LOAD_CONST <code process_actions>
  MAKE_FUNCTION defaults
  STORE_NAME process_actions
  RETURN_CONST None
END
CODE process_actions(action_ids)
  DOC 'pass'
  RESUME 0
  LOAD_CONST 0
  STORE_FAST actions_taken
  LOAD_GLOBAL PublishAction
  LOAD_ATTR objects
  LOAD_ATTR NULL|self + prefetch_related
  LOAD_CONST 'content_object'
  CALL 1
  LOAD_ATTR NULL|self + filter
  LOAD_GLOBAL timezone
  LOAD_ATTR NULL|self + now
  CALL 0
  KW_NAMES ('scheduled_time__lte',)
  CALL 1
  STORE_FAST action_list
  LOAD_FAST action_ids
  POP_JUMP_IF_NONE L1
  LOAD_FAST action_list
  LOAD_ATTR NULL|self + filter
  LOAD_FAST action_ids
  KW_NAMES ('id__in',)
  CALL 1
  STORE_FAST action_list
L1:
  LOAD_FAST action_list
  GET_ITER
L2:
  FOR_ITER L3
  STORE_FAST action
  LOAD_FAST action
  LOAD_ATTR NULL|self + process_action
  CALL 0
  POP_TOP
  LOAD_FAST action
  LOAD_ATTR NULL|self + delete
  CALL 0
  POP_TOP
  LOAD_FAST actions_taken
  LOAD_CONST 1
  BINARY_OP +=
  STORE_FAST actions_taken
  JUMP_BACKWARD L2
L3:
  END_FOR
  LOAD_FAST actions_taken
  RETURN_VALUE
END

def process_actions(action_ids=None):
    """pass"""
    actions_taken = 0
    action_list = PublishAction.objects.prefetch_related('content_object').filter(scheduled_time__lte=timezone.now())
    if action_ids is not None:
        action_list = action_list.filter(id__in=action_ids)
    for action in action_list:
        action.process_action()
        action.delete()
        actions_taken += 1
    return actions_taken


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code celery_enabled>
  MAKE_FUNCTION 0
  STORE_NAME celery_enabled
  RETURN_CONST None
END
CODE celery_enabled()
  DOC 'pass'
  RESUME 0
  LOAD_GLOBAL NULL + getattr
  LOAD_GLOBAL settings
  LOAD_CONST 'GLITTER_PUBLISHER_CELERY'
  LOAD_CONST None
  CALL 3
  STORE_FAST enabled
  LOAD_FAST enabled
  POP_JUMP_IF_NOT_NONE L3
  NOP
L1:
  LOAD_CONST 0
  LOAD_CONST None
  IMPORT_NAME celery
  STORE_FAST celery
  LOAD_CONST True
  STORE_FAST enabled
L2:
  LOAD_FAST enabled
  RETURN_VALUE
L3:
  LOAD_FAST enabled
  RETURN_VALUE
L4:
  PUSH_EXC_INFO
  LOAD_GLOBAL ImportError
  CHECK_EXC_MATCH
  POP_JUMP_IF_FALSE L6
  POP_TOP
  LOAD_CONST False
  STORE_FAST enabled
L5:
  POP_EXCEPT
  LOAD_FAST enabled
  RETURN_VALUE
L6:
  RERAISE 0
L7:
  COPY 3
  POP_EXCEPT
  RERAISE 1
  EXC try=L1..L2 -> handler=L4 depth=0 lasti=False
  EXC try=L4..L5 -> handler=L7 depth=1 lasti=True
  EXC try=L6..L7 -> handler=L7 depth=1 lasti=True
END

def celery_enabled():
    """pass"""
    enabled = getattr(settings, 'GLITTER_PUBLISHER_CELERY', None)
    if enabled is None:
        try:
            import celery
            enabled = True
        except ImportError:
            enabled = False
    return enabled


Input:
CODE <module>()
  DOC 'infile'
  RESUME 0
  LOAD_CONST 'infile'
  LOAD_NAME typing
  LOAD_ATTR IO
  LOAD_NAME str
  BINARY_SUBSCR
  LOAD_CONST 'return'
  LOAD_NAME int
  BUILD_TUPLE 4
  LOAD_CONST <code do_command_line>
  MAKE_FUNCTION annotations
  STORE_NAME do_command_line
  RETURN_CONST None
END
CODE do_command_line(infile)
  DOC 'pass'
  RESUME 0
  LOAD_FAST infile
  LOAD_ATTR NULL|self + readlines
  CALL 0
  STORE_FAST lines
  LOAD_GLOBAL ast
  LOAD_ATTR NULL|self + parse
  LOAD_CONST ''
  LOAD_ATTR NULL|self + join
  LOAD_FAST lines
  CALL 1
  CALL 1
  STORE_FAST tree
  LOAD_GLOBAL NULL + Checker
  LOAD_FAST tree
  LOAD_FAST lines
  LOAD_FAST infile
  LOAD_ATTR name
  CALL 3
  STORE_FAST checker
  LOAD_FAST checker
  LOAD_ATTR NULL|self + load
  CALL 0
  POP_TOP
  BUILD_LIST 0
  STORE_FAST errors
  LOAD_FAST checker
  LOAD_ATTR NULL|self + all_funcs
  LOAD_CONST True
  KW_NAMES ('skip_noqa',)
  CALL 1
  GET_ITER
L1:
  FOR_ITER L4
  STORE_FAST func
  NOP
L2:
  LOAD_GLOBAL NULL + list
  LOAD_FAST func
  LOAD_ATTR NULL|self + check_all
  CALL 0
  CALL 1
  STORE_FAST errors
L3:
  LOAD_GLOBAL NULL + print
  LOAD_FAST func
  LOAD_ATTR NULL|self + __str__
  LOAD_FAST errors
  CALL 1
  LOAD_CONST ''
  KW_NAMES ('end',)
  CALL 2
  POP_TOP
  JUMP_BACKWARD L1
L4:
  END_FOR
  LOAD_GLOBAL NULL + len
  LOAD_FAST errors
  CALL 1
  RETURN_VALUE
L5:
  PUSH_EXC_INFO
  LOAD_GLOBAL ValidationError
  CHECK_EXC_MATCH
  POP_JUMP_IF_FALSE L9
  STORE_FAST error
L6:
  LOAD_FAST error
  LOAD_ATTR NULL|self + to_aaa
  CALL 0
  BUILD_LIST 1
  STORE_FAST errors
L7:
  POP_EXCEPT
  LOAD_CONST None
  STORE_FAST error
  DELETE_FAST error
  JUMP_BACKWARD L3
L8:
  LOAD_CONST None
  STORE_FAST error
  DELETE_FAST error
  RERAISE 1
L9:
  RERAISE 0
L10:
  COPY 3
  POP_EXCEPT
  RERAISE 1
  EXC try=L2..L3 -> handler=L5 depth=1 lasti=False
  EXC try=L5..L6 -> handler=L10 depth=2 lasti=True
  EXC try=L6..L7 -> handler=L8 depth=2 lasti=True
  EXC try=L8..L10 -> handler=L10 depth=2 lasti=True
END

def do_command_line(infile: typing.IO[str]) -> int:
    """pass"""
    lines = infile.readlines()
    tree = ast.parse(''.join(lines))
    checker = Checker(tree, lines, infile.name)
    checker.load()
    errors = []
    for func in checker.all_funcs(skip_noqa=True):
        try:
            errors = list(func.check_all())
        except ValidationError as error:
            errors = [error.to_aaa()]
        print(func.__str__(errors), end='')
    return len(errors)


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code _izip>
  MAKE_FUNCTION 0
  STORE_NAME _izip
  RETURN_CONST None
END
CODE _izip(*iterables)
  DOC 'pass'
  RETURN_GENERATOR
  POP_TOP
L1:
  RESUME 0
  LOAD_GLOBAL NULL + map
  LOAD_GLOBAL iter
  LOAD_FAST iterables
  CALL 2
  STORE_FAST iterators
  LOAD_FAST iterators
  POP_JUMP_IF_FALSE L5
L2:
  LOAD_GLOBAL NULL + tuple
  LOAD_GLOBAL NULL + map
  LOAD_GLOBAL next
  LOAD_FAST iterators
  CALL 2
  CALL 1
  YIELD_VALUE 1
  RESUME 1
  POP_TOP
  LOAD_FAST iterators
  POP_JUMP_IF_FALSE L4
L3:
  JUMP_BACKWARD L2
L4:
  RETURN_CONST None
L5:
  RETURN_CONST None
L6:
  CALL_INTRINSIC_1 INTRINSIC_STOPITERATION_ERROR
  RERAISE 1
  EXC try=L1..L3 -> handler=L6 depth=0 lasti=True
  EXC try=L4..L6 -> handler=L6 depth=0 lasti=True
END

def _izip(*iterables):
    """pass"""
    iterators = map(iter, iterables)
    while iterators:
        yield tuple(map(next, iterators))


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (False, None)
  LOAD_CONST <code _checkinput>
  MAKE_FUNCTION defaults
  STORE_NAME _checkinput
  RETURN_CONST None
END
CODE _checkinput(zi, Mi, z, verbose)
  DOC 'pass'
  RESUME 0
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + array
  LOAD_FAST zi
  LOAD_CONST 1
  LOAD_GLOBAL float
  KW_NAMES ('ndmin', 'dtype')
  CALL 3
  STORE_FAST zi
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + array
  LOAD_FAST Mi
  LOAD_CONST 1
  LOAD_GLOBAL float
  KW_NAMES ('ndmin', 'dtype')
  CALL 3
  STORE_FAST Mi
  LOAD_FAST zi
  LOAD_ATTR size
  LOAD_CONST 1
  COMPARE_OP >
  POP_JUMP_IF_FALSE L1
  LOAD_FAST Mi
  LOAD_ATTR size
  LOAD_CONST 1
  COMPARE_OP >
  POP_JUMP_IF_FALSE L1
  LOAD_FAST zi
  LOAD_ATTR size
  LOAD_FAST Mi
  LOAD_ATTR size
  COMPARE_OP !=
  POP_JUMP_IF_FALSE L6
  LOAD_GLOBAL NULL + print
  LOAD_CONST 'Error ambiguous request'
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST 'Need individual redshifts for all haloes provided '
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST 'Or have all haloes at same redshift '
  CALL 1
  POP_TOP
  RETURN_CONST -1
L1:
  LOAD_FAST zi
  LOAD_ATTR size
  LOAD_CONST 1
  COMPARE_OP ==
  POP_JUMP_IF_FALSE L3
  LOAD_FAST Mi
  LOAD_ATTR size
  LOAD_CONST 1
  COMPARE_OP >
  POP_JUMP_IF_FALSE L3
  LOAD_FAST verbose
  POP_JUMP_IF_FALSE L2
  LOAD_GLOBAL NULL + print
  LOAD_CONST 'Assume zi is the same for all Mi halo masses provided'
  CALL 1
  POP_TOP
L2:
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + ones_like
  LOAD_FAST Mi
  CALL 1
  LOAD_FAST zi
  LOAD_CONST 0
  BINARY_SUBSCR
  BINARY_OP *
  STORE_FAST zi
  JUMP_FORWARD L6
L3:
  LOAD_FAST Mi
  LOAD_ATTR size
  LOAD_CONST 1
  COMPARE_OP ==
  POP_JUMP_IF_FALSE L5
  LOAD_FAST zi
  LOAD_ATTR size
  LOAD_CONST 1
  COMPARE_OP >
  POP_JUMP_IF_FALSE L5
  LOAD_FAST verbose
  POP_JUMP_IF_FALSE L4
  LOAD_GLOBAL NULL + print
  LOAD_CONST 'Assume Mi halo masses are the same for all zi provided'
  CALL 1
  POP_TOP
L4:
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + ones_like
  LOAD_FAST zi
  CALL 1
  LOAD_FAST Mi
  LOAD_CONST 0
  BINARY_SUBSCR
  BINARY_OP *
  STORE_FAST Mi
  JUMP_FORWARD L6
L5:
  LOAD_FAST verbose
  POP_JUMP_IF_FALSE L6
  LOAD_GLOBAL NULL + print
  LOAD_CONST 'A single Mi and zi provided'
  CALL 1
  POP_TOP
L6:
  LOAD_FAST z
  LOAD_CONST False
  IS_OP 0
  POP_JUMP_IF_FALSE L7
  LOAD_CONST 1
  STORE_FAST lenzout
  JUMP_FORWARD L8
L7:
  LOAD_GLOBAL np
  LOAD_ATTR NULL|self + array
  LOAD_FAST z
  LOAD_CONST 1
  LOAD_GLOBAL float
  KW_NAMES ('ndmin', 'dtype')
  CALL 3
  STORE_FAST z
  LOAD_FAST z
  LOAD_ATTR size
  STORE_FAST lenzout
L8:
  LOAD_FAST zi
  LOAD_FAST Mi
  LOAD_FAST z
  LOAD_FAST zi
  LOAD_ATTR size
  LOAD_FAST Mi
  LOAD_ATTR size
  LOAD_FAST lenzout
  BUILD_TUPLE 6
  RETURN_VALUE
END

def _checkinput(zi, Mi, z=False, verbose=None):
    """pass"""
    zi = np.array(zi, ndmin=1, dtype=float)
    Mi = np.array(Mi, ndmin=1, dtype=float)
    if zi.size > 1 and Mi.size > 1:
        if zi.size != Mi.size:
            print('Error ambiguous request')
            print('Need individual redshifts for all haloes provided ')
            print('Or have all haloes at same redshift ')
            return -1
    elif zi.size == 1 and Mi.size > 1:
        if verbose:
            print('Assume zi is the same for all Mi halo masses provided')
        zi = np.ones_like(Mi) * zi[0]
    elif Mi.size == 1 and zi.size > 1:
        if verbose:
            print('Assume Mi halo masses are the same for all zi provided')
        Mi = np.ones_like(zi) * Mi[0]
    elif verbose:
        print('A single Mi and zi provided')
    if z is False:
        lenzout = 1
    else:
        z = np.array(z, ndmin=1, dtype=float)
        lenzout = z.size
    return (zi, Mi, z, zi.size, Mi.size, lenzout)


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code getcosmo>
  MAKE_FUNCTION 0
  STORE_NAME getcosmo
  RETURN_CONST None
END
CODE getcosmo(cosmology)
  DOC 'pass'
  RESUME 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + DRAGONS
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP1_Mill
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP3_ML
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP5_mean
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP7_ML
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP9_ML
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP1_2dF_mean
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP3_mean
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP5_ML
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP5_BAO_SN_mean
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP7_BAO_H0_mean
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + Planck_2013
  CALL 0
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + Planck_2015
  CALL 0
  LOAD_CONST ('dragons', 'wmap1', 'wmap3', 'wmap5', 'wmap7', 'wmap9', 'wmap1_lss', 'wmap3_mean', 'wmap5_ml', 'wmap5_lss', 'wmap7_lss', 'planck13', 'planck15')
  BUILD_CONST_KEY_MAP 13
  STORE_FAST defaultcosmologies
  LOAD_GLOBAL NULL + isinstance
  LOAD_FAST cosmology
  LOAD_GLOBAL dict
  CALL 2
  POP_JUMP_IF_FALSE L5
  LOAD_FAST cosmology
  STORE_FAST cosmo
  LOAD_CONST 'A_scaling'
  LOAD_FAST cosmology
  LOAD_ATTR NULL|self + keys
  CALL 0
  CONTAINS_OP 1
  POP_JUMP_IF_FALSE L1
  LOAD_GLOBAL NULL + getAscaling
  LOAD_FAST cosmology
  LOAD_CONST True
  KW_NAMES ('newcosmo',)
  CALL 2
  STORE_FAST A_scaling
  LOAD_FAST cosmo
  LOAD_ATTR NULL|self + update
  LOAD_CONST 'A_scaling'
  LOAD_FAST A_scaling
  BUILD_MAP 1
  CALL 1
  POP_TOP
L1:
  LOAD_GLOBAL cg
  LOAD_ATTR NULL|self + WMAP5_mean
  CALL 0
  LOAD_ATTR NULL|self + keys
  CALL 0
  GET_ITER
L2:
  FOR_ITER L4
  STORE_FAST paramnames
  LOAD_FAST paramnames
  LOAD_FAST cosmology
  LOAD_ATTR NULL|self + keys
  CALL 0
  CONTAINS_OP 1
  POP_JUMP_IF_TRUE L3
  JUMP_BACKWARD L2
L3:
  LOAD_FAST cosmo
  LOAD_ATTR NULL|self + update
  LOAD_FAST paramnames
  LOAD_CONST 0
  BUILD_MAP 1
  CALL 1
  POP_TOP
  JUMP_BACKWARD L2
L4:
  END_FOR
  JUMP_FORWARD L7
L5:
  LOAD_FAST cosmology
  LOAD_ATTR NULL|self + lower
  CALL 0
  LOAD_FAST defaultcosmologies
  LOAD_ATTR NULL|self + keys
  CALL 0
  CONTAINS_OP 0
  POP_JUMP_IF_FALSE L6
  LOAD_FAST defaultcosmologies
  LOAD_FAST cosmology
  LOAD_ATTR NULL|self + lower
  CALL 0
  BINARY_SUBSCR
  STORE_FAST cosmo
  LOAD_GLOBAL NULL + getAscaling
  LOAD_FAST cosmology
  CALL 1
  STORE_FAST A_scaling
  LOAD_FAST cosmo
  LOAD_ATTR NULL|self + update
  LOAD_CONST 'A_scaling'
  LOAD_FAST A_scaling
  BUILD_MAP 1
  CALL 1
  POP_TOP
  JUMP_FORWARD L7
L6:
  LOAD_GLOBAL NULL + print
  LOAD_CONST "You haven't passed a dict of cosmological parameters "
  CALL 1
  POP_TOP
  LOAD_GLOBAL NULL + print
  LOAD_CONST 'OR a recognised cosmology, you gave %s'
  LOAD_FAST cosmology
  BINARY_OP %
  CALL 1
  POP_TOP
L7:
  LOAD_GLOBAL cp
  LOAD_ATTR distance
  LOAD_ATTR NULL|self + set_omega_k_0
  LOAD_FAST_CHECK cosmo
  CALL 1
  STORE_FAST cosmo
  LOAD_FAST cosmo
  RETURN_VALUE
END

def getcosmo(cosmology):
    """pass"""
    defaultcosmologies = {'dragons': cg.DRAGONS(), 'wmap1': cg.WMAP1_Mill(), 'wmap3': cg.WMAP3_ML(), 'wmap5': cg.WMAP5_mean(), 'wmap7': cg.WMAP7_ML(), 'wmap9': cg.WMAP9_ML(), 'wmap1_lss': cg.WMAP1_2dF_mean(), 'wmap3_mean': cg.WMAP3_mean(), 'wmap5_ml': cg.WMAP5_ML(), 'wmap5_lss': cg.WMAP5_BAO_SN_mean(), 'wmap7_lss': cg.WMAP7_BAO_H0_mean(), 'planck13': cg.Planck_2013(), 'planck15': cg.Planck_2015()}
    if isinstance(cosmology, dict):
        cosmo = cosmology
        if 'A_scaling' not in cosmology.keys():
            A_scaling = getAscaling(cosmology, newcosmo=True)
            cosmo.update({'A_scaling': A_scaling})
        for paramnames in cg.WMAP5_mean().keys():
            if paramnames not in cosmology.keys():
                cosmo.update({paramnames: 0})
    elif cosmology.lower() in defaultcosmologies.keys():
        cosmo = defaultcosmologies[cosmology.lower()]
        A_scaling = getAscaling(cosmology)
        cosmo.update({'A_scaling': A_scaling})
    else:
        print("You haven't passed a dict of cosmological parameters ")
        print('OR a recognised cosmology, you gave %s' % cosmology)
    cosmo = cp.distance.set_omega_k_0(cosmo)
    return cosmo


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code _getcosmoheader>
  MAKE_FUNCTION 0
  STORE_NAME _getcosmoheader
  RETURN_CONST None
END
CODE _getcosmoheader(cosmo)
  DOC 'pass'
  RESUME 0
  LOAD_CONST '# Cosmology (flat) Om:{0:.3f}, Ol:{1:.3f}, h:{2:.2f}, sigma8:{3:.3f}, ns:{4:.2f}'
  LOAD_ATTR NULL|self + format
  LOAD_FAST cosmo
  LOAD_CONST 'omega_M_0'
  BINARY_SUBSCR
  LOAD_FAST cosmo
  LOAD_CONST 'omega_lambda_0'
  BINARY_SUBSCR
  LOAD_FAST cosmo
  LOAD_CONST 'h'
  BINARY_SUBSCR
  LOAD_FAST cosmo
  LOAD_CONST 'sigma_8'
  BINARY_SUBSCR
  LOAD_FAST cosmo
  LOAD_CONST 'n'
  BINARY_SUBSCR
  CALL 5
  STORE_FAST cosmoheader
  LOAD_FAST cosmoheader
  RETURN_VALUE
END

def _getcosmoheader(cosmo):
    """pass"""
    cosmoheader = '# Cosmology (flat) Om:{0:.3f}, Ol:{1:.3f}, h:{2:.2f}, sigma8:{3:.3f}, ns:{4:.2f}'.format(cosmo['omega_M_0'], cosmo['omega_lambda_0'], cosmo['h'], cosmo['sigma_8'], cosmo['n'])
    return cosmoheader


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code tag>
  MAKE_FUNCTION 0
  STORE_NAME tag
  RETURN_CONST None
END
CODE tag(self, tag)
  DOC 'pass'
  RESUME 0
  LOAD_FAST self
  FORMAT_VALUE str
  LOAD_CONST '/tags/'
  LOAD_FAST tag
  FORMAT_VALUE str
  BUILD_STRING 3
  STORE_FAST url
  LOAD_FAST self
  LOAD_ATTR http
  LOAD_ATTR NULL|self + get
  LOAD_FAST url
  LOAD_FAST self
  LOAD_ATTR auth
  KW_NAMES ('auth',)
  CALL 2
  STORE_FAST response
  LOAD_FAST response
  LOAD_ATTR NULL|self + raise_for_status
  CALL 0
  POP_TOP
  LOAD_FAST response
  LOAD_ATTR NULL|self + json
  CALL 0
  RETURN_VALUE
END

def tag(self, tag):
    """pass"""
    url = '%s/tags/%s' % (self, tag)
    response = self.http.get(url, auth=self.auth)
    response.raise_for_status()
    return response.json()


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code release_assets>
  MAKE_FUNCTION 0
  STORE_NAME release_assets
  RETURN_CONST None
END
CODE release_assets(self, release)
  DOC 'pass'
  RESUME 0
  LOAD_FAST self
  LOAD_ATTR NULL|self + as_id
  LOAD_FAST release
  CALL 1
  STORE_FAST release
  LOAD_FAST self
  LOAD_ATTR NULL|self + get_list
  LOAD_FAST self
  FORMAT_VALUE str
  LOAD_CONST '/'
  LOAD_FAST release
  FORMAT_VALUE str
  LOAD_CONST '/assets'
  BUILD_STRING 4
  KW_NAMES ('url',)
  CALL 1
  RETURN_VALUE
END

def release_assets(self, release):
    """pass"""
    release = self.as_id(release)
    return self.get_list(url='%s/%s/assets' % (self, release))


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (None,)
  LOAD_CONST <code upload>
  MAKE_FUNCTION defaults
  STORE_NAME upload
  RETURN_CONST None
END
CODE upload(self, release, filename, content_type)
  DOC 'pass'
  RESUME 0
  LOAD_FAST self
  LOAD_ATTR NULL|self + as_id
  LOAD_FAST release
  CALL 1
  STORE_FAST release
  LOAD_GLOBAL os
  LOAD_ATTR path
  LOAD_ATTR NULL|self + basename
  LOAD_FAST filename
  CALL 1
  STORE_FAST name
  LOAD_FAST content_type
  POP_JUMP_IF_TRUE L1
  LOAD_GLOBAL mimetypes
  LOAD_ATTR NULL|self + guess_type
  LOAD_FAST name
  CALL 1
  UNPACK_SEQUENCE 2
  STORE_FAST content_type
  STORE_FAST _
L1:
  LOAD_FAST content_type
  POP_JUMP_IF_TRUE L2
  LOAD_GLOBAL NULL + ValueError
  LOAD_CONST 'content_type not known'
  CALL 1
  RAISE_VARARGS 1
L2:
  LOAD_CONST 'name'
  LOAD_FAST name
  BUILD_MAP 1
  STORE_FAST inputs
  LOAD_FAST self
  LOAD_ATTR uploads_url
  FORMAT_VALUE str
  LOAD_GLOBAL NULL + urlsplit
  LOAD_FAST self
  LOAD_ATTR api_url
  CALL 1
  LOAD_ATTR path
  FORMAT_VALUE str
  LOAD_CONST '/'
  LOAD_FAST release
  FORMAT_VALUE str
  LOAD_CONST '/assets'
  BUILD_STRING 5
  STORE_FAST url
  LOAD_GLOBAL os
  LOAD_ATTR NULL|self + stat
  LOAD_FAST filename
  CALL 1
  STORE_FAST info
  LOAD_FAST info
  LOAD_GLOBAL stat
  LOAD_ATTR ST_SIZE
  BINARY_SUBSCR
  STORE_FAST size
  LOAD_FAST self
  LOAD_ATTR http
  LOAD_ATTR NULL|self + post
  LOAD_FAST url
  LOAD_GLOBAL NULL + stream_upload
  LOAD_FAST filename
  CALL 1
  LOAD_FAST self
  LOAD_ATTR auth
  LOAD_FAST inputs
  LOAD_FAST content_type
  LOAD_GLOBAL NULL + str
  LOAD_FAST size
  CALL 1
  LOAD_CONST ('content-type', 'content-length')
  BUILD_CONST_KEY_MAP 2
  KW_NAMES ('data', 'auth', 'params', 'headers')
  CALL 5
  STORE_FAST response
  LOAD_FAST response
  LOAD_ATTR NULL|self + raise_for_status
  CALL 0
  POP_TOP
  LOAD_FAST response
  LOAD_ATTR NULL|self + json
  CALL 0
  RETURN_VALUE
END

def upload(self, release, filename, content_type=None):
    """pass"""
    release = self.as_id(release)
    name = os.path.basename(filename)
    if not content_type:
        content_type, _ = mimetypes.guess_type(name)
    if not content_type:
        raise ValueError('content_type not known')
    inputs = {'name': name}
    url = '%s%s/%s/assets' % (self.uploads_url, urlsplit(self.api_url).path, release)
    info = os.stat(filename)
    size = info[stat.ST_SIZE]
    response = self.http.post(url, data=stream_upload(filename), auth=self.auth, params=inputs, headers={'content-type': content_type, 'content-length': str(size)})
    response.raise_for_status()
    return response.json()


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (None,)
  LOAD_CONST <code validate_tag>
  MAKE_FUNCTION defaults
  STORE_NAME validate_tag
  RETURN_CONST None
END
CODE validate_tag(self, tag_name, prefix)
  DOC 'pass'
  RESUME 0
  LOAD_GLOBAL NULL + semantic_version
  LOAD_FAST tag_name
  CALL 1
  STORE_FAST new_version
  LOAD_FAST self
  LOAD_ATTR NULL|self + latest
  CALL 0
  STORE_FAST current
  LOAD_FAST current
  POP_JUMP_IF_FALSE L4
  LOAD_FAST current
  LOAD_CONST 'tag_name'
  BINARY_SUBSCR
  STORE_FAST tag_name
  LOAD_FAST prefix
  POP_JUMP_IF_FALSE L1
  LOAD_FAST tag_name
  LOAD_GLOBAL NULL + len
  LOAD_FAST prefix
  CALL 1
  LOAD_CONST None
  BINARY_SLICE
  STORE_FAST tag_name
L1:
  LOAD_GLOBAL NULL + semantic_version
  LOAD_FAST tag_name
  CALL 1
  STORE_FAST tag_name
  LOAD_FAST tag_name
  LOAD_FAST new_version
  COMPARE_OP >=
  POP_JUMP_IF_FALSE L4
  LOAD_FAST tag_name
  LOAD_FAST new_version
  COMPARE_OP ==
  POP_JUMP_IF_FALSE L2
  LOAD_CONST 'equal to'
  JUMP_FORWARD L3
L2:
  LOAD_CONST 'older than'
L3:
  STORE_FAST what
  LOAD_GLOBAL NULL + GithubException
  LOAD_CONST 'Your local version "'
  LOAD_GLOBAL NULL + str
  LOAD_FAST new_version
  CALL 1
  FORMAT_VALUE str
  LOAD_CONST '" is '
  LOAD_FAST what
  FORMAT_VALUE str
  LOAD_CONST ' the current github version "'
  LOAD_GLOBAL NULL + str
  LOAD_FAST tag_name
  CALL 1
  FORMAT_VALUE str
  LOAD_CONST '".\nBump the local version to continue.'
  BUILD_STRING 7
  CALL 1
  RAISE_VARARGS 1
L4:
  LOAD_FAST current
  RETURN_VALUE
END

def validate_tag(self, tag_name, prefix=None):
    """pass"""
    new_version = semantic_version(tag_name)
    current = self.latest()
    if current:
        tag_name = current['tag_name']
        if prefix:
            tag_name = tag_name[len(prefix):]
        tag_name = semantic_version(tag_name)
        if tag_name >= new_version:
            what = 'equal to' if tag_name == new_version else 'older than'
            raise GithubException('Your local version "%s" is %s the current github version "%s".\nBump the local version to continue.' % (str(new_version), what, str(tag_name)))
    return current


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (None,)
  LOAD_CONST <code is_related_to>
  MAKE_FUNCTION defaults
  STORE_NAME is_related_to
  RETURN_CONST None
END
CODE is_related_to(item, app_id, app_ver)
  DOC 'pass'
  RESUME 0
  LOAD_FAST item
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'versionRange'
  CALL 1
  STORE_FAST versionRange
  LOAD_FAST versionRange
  POP_JUMP_IF_TRUE L1
  RETURN_CONST True
L1:
  LOAD_FAST versionRange
  GET_ITER
L2:
  FOR_ITER L5
  STORE_FAST vR
  LOAD_FAST vR
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'targetApplication'
  CALL 1
  POP_JUMP_IF_TRUE L3
  POP_TOP
  RETURN_CONST True
L3:
  LOAD_GLOBAL NULL + get_related_targetApplication
  LOAD_FAST vR
  LOAD_FAST app_id
  LOAD_FAST app_ver
  CALL 3
  POP_JUMP_IF_NOT_NONE L4
  JUMP_BACKWARD L2
L4:
  POP_TOP
  RETURN_CONST True
L5:
  END_FOR
  RETURN_CONST False
END

def is_related_to(item, app_id, app_ver=None):
    """pass"""
    versionRange = item.get('versionRange')
    if not versionRange:
        return True
    for vR in versionRange:
        if not vR.get('targetApplication'):
            return True
        if get_related_targetApplication(vR, app_id, app_ver) is not None:
            return True
    return False


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code get_related_targetApplication>
  MAKE_FUNCTION 0
  STORE_NAME get_related_targetApplication
  RETURN_CONST None
END
CODE get_related_targetApplication(vR, app_id, app_ver)
  DOC 'pass'
  RESUME 0
  LOAD_FAST vR
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'targetApplication'
  CALL 1
  STORE_FAST targetApplication
  LOAD_FAST targetApplication
  POP_JUMP_IF_TRUE L1
  RETURN_CONST None
L1:
  LOAD_FAST targetApplication
  GET_ITER
L2:
  FOR_ITER L6
  STORE_FAST tA
  LOAD_FAST tA
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'guid'
  CALL 1
  STORE_FAST guid
  LOAD_FAST guid
  POP_JUMP_IF_FALSE L3
  LOAD_FAST guid
  LOAD_FAST app_id
  COMPARE_OP ==
  POP_JUMP_IF_TRUE L3
  JUMP_BACKWARD L2
L3:
  LOAD_FAST app_ver
  POP_JUMP_IF_TRUE L4
  LOAD_FAST tA
  SWAP 2
  POP_TOP
  RETURN_VALUE
L4:
  LOAD_GLOBAL NULL + between
  LOAD_GLOBAL NULL + version_int
  LOAD_FAST app_ver
  CALL 1
  LOAD_CONST '0'
  LOAD_FAST tA
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'maxVersion'
  LOAD_CONST '*'
  CALL 2
  CALL 3
  POP_JUMP_IF_TRUE L5
  JUMP_BACKWARD L2
L5:
  LOAD_FAST tA
  SWAP 2
  POP_TOP
  RETURN_VALUE
L6:
  END_FOR
  RETURN_CONST None
END

def get_related_targetApplication(vR, app_id, app_ver):
    """pass"""
    targetApplication = vR.get('targetApplication')
    if not targetApplication:
        return None
    for tA in targetApplication:
        guid = tA.get('guid')
        if not guid or guid == app_id:
            if not app_ver:
                return tA
            if between(version_int(app_ver), '0', tA.get('maxVersion', '*')):
                return tA
    return None


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (3, None)
  LOAD_CONST <code write_addons_items>
  MAKE_FUNCTION defaults
  STORE_NAME write_addons_items
  RETURN_CONST None
END
CODE write_addons_items(xml_tree, records, app_id, api_ver, app_ver)
  DOC 'pass'
  RESUME 0
  LOAD_FAST records
  POP_JUMP_IF_TRUE L1
  RETURN_CONST None
L1:
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST xml_tree
  LOAD_CONST 'emItems'
  CALL 2
  STORE_FAST emItems
  BUILD_MAP 0
  STORE_FAST groupby
  LOAD_FAST records
  GET_ITER
L2:
  EXTENDED_ARG 1
  FOR_ITER L12
  STORE_FAST item
  LOAD_GLOBAL NULL + is_related_to
  LOAD_FAST item
  LOAD_FAST app_id
  LOAD_FAST app_ver
  CALL 3
  POP_JUMP_IF_TRUE L3
  JUMP_BACKWARD L2
L3:
  LOAD_FAST item
  LOAD_CONST 'guid'
  BINARY_SUBSCR
  LOAD_FAST groupby
  CONTAINS_OP 0
  POP_JUMP_IF_FALSE L5
  LOAD_FAST groupby
  LOAD_FAST item
  LOAD_CONST 'guid'
  BINARY_SUBSCR
  BINARY_SUBSCR
  STORE_FAST emItem
  LOAD_CONST 'blockID'
  LOAD_FAST item
  CONTAINS_OP 0
  POP_JUMP_IF_FALSE L4
  LOAD_GLOBAL NULL + int
  LOAD_FAST item
  LOAD_CONST 'blockID'
  BINARY_SUBSCR
  LOAD_CONST 1
  LOAD_CONST None
  BINARY_SLICE
  CALL 1
  STORE_FAST current_blockID
  LOAD_GLOBAL NULL + int
  LOAD_FAST emItem
  LOAD_ATTR attrib
  LOAD_CONST 'blockID'
  BINARY_SUBSCR
  LOAD_CONST 1
  LOAD_CONST None
  BINARY_SLICE
  CALL 1
  STORE_FAST previous_blockID
  LOAD_FAST current_blockID
  LOAD_FAST previous_blockID
  COMPARE_OP >
  POP_JUMP_IF_FALSE L8
  LOAD_FAST item
  LOAD_CONST 'blockID'
  BINARY_SUBSCR
  LOAD_FAST emItem
  LOAD_ATTR attrib
  LOAD_CONST 'blockID'
  STORE_SUBSCR
  JUMP_FORWARD L8
L4:
  LOAD_FAST item
  LOAD_CONST 'id'
  BINARY_SUBSCR
  LOAD_FAST emItem
  LOAD_ATTR attrib
  LOAD_CONST 'blockID'
  STORE_SUBSCR
  JUMP_FORWARD L8
L5:
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST emItems
  LOAD_CONST 'emItem'
  LOAD_FAST item
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'blockID'
  LOAD_FAST item
  LOAD_CONST 'id'
  BINARY_SUBSCR
  CALL 2
  KW_NAMES ('blockID',)
  CALL 3
  STORE_FAST emItem
  LOAD_FAST emItem
  LOAD_FAST groupby
  LOAD_FAST item
  LOAD_CONST 'guid'
  BINARY_SUBSCR
  STORE_SUBSCR
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST emItem
  LOAD_CONST 'prefs'
  CALL 2
  STORE_FAST prefs
  LOAD_FAST item
  LOAD_CONST 'prefs'
  BINARY_SUBSCR
  GET_ITER
L6:
  FOR_ITER L7
  STORE_FAST p
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST prefs
  LOAD_CONST 'pref'
  CALL 2
  STORE_FAST pref
  LOAD_FAST p
  LOAD_FAST pref
  STORE_ATTR text
  JUMP_BACKWARD L6
L7:
  END_FOR
L8:
  LOAD_FAST emItem
  LOAD_ATTR NULL|self + set
  LOAD_CONST 'id'
  LOAD_FAST item
  LOAD_CONST 'guid'
  BINARY_SUBSCR
  CALL 2
  POP_TOP
  LOAD_CONST ('name', 'os')
  GET_ITER
L9:
  FOR_ITER L11
  STORE_FAST field
  LOAD_FAST field
  LOAD_FAST item
  CONTAINS_OP 0
  POP_JUMP_IF_TRUE L10
  JUMP_BACKWARD L9
L10:
  LOAD_FAST emItem
  LOAD_ATTR NULL|self + set
  LOAD_FAST field
  LOAD_FAST item
  LOAD_FAST field
  BINARY_SUBSCR
  CALL 2
  POP_TOP
  JUMP_BACKWARD L9
L11:
  END_FOR
  LOAD_GLOBAL NULL + build_version_range
  LOAD_FAST emItem
  LOAD_FAST item
  LOAD_FAST app_id
  CALL 3
  POP_TOP
  EXTENDED_ARG 1
  JUMP_BACKWARD L2
L12:
  END_FOR
  RETURN_CONST None
END

def write_addons_items(xml_tree, records, app_id, api_ver=3, app_ver=None):
    """pass"""
    if not records:
        return
    emItems = etree.SubElement(xml_tree, 'emItems')
    groupby = {}
    for item in records:
        if is_related_to(item, app_id, app_ver):
            if item['guid'] in groupby:
                emItem = groupby[item['guid']]
                if 'blockID' in item:
                    current_blockID = int(item['blockID'][1:])
                    previous_blockID = int(emItem.attrib['blockID'][1:])
                    if current_blockID > previous_blockID:
                        emItem.attrib['blockID'] = item['blockID']
                else:
                    emItem.attrib['blockID'] = item['id']
            else:
                emItem = etree.SubElement(emItems, 'emItem', blockID=item.get('blockID', item['id']))
                groupby[item['guid']] = emItem
                prefs = etree.SubElement(emItem, 'prefs')
                for p in item['prefs']:
                    pref = etree.SubElement(prefs, 'pref')
                    pref.text = p
            emItem.set('id', item['guid'])
            for field in ['name', 'os']:
                if field in item:
                    emItem.set(field, item[field])
            build_version_range(emItem, item, app_id)


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (3, None)
  LOAD_CONST <code write_plugin_items>
  MAKE_FUNCTION defaults
  STORE_NAME write_plugin_items
  RETURN_CONST None
END
CODE write_plugin_items(xml_tree, records, app_id, api_ver, app_ver)
  DOC 'pass'
  RESUME 0
  LOAD_FAST records
  POP_JUMP_IF_TRUE L1
  RETURN_CONST None
L1:
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST xml_tree
  LOAD_CONST 'pluginItems'
  CALL 2
  STORE_FAST pluginItems
  LOAD_FAST records
  GET_ITER
L2:
  FOR_ITER L7
  STORE_FAST item
  LOAD_FAST item
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'versionRange'
  BUILD_LIST 0
  CALL 2
  GET_ITER
L3:
  FOR_ITER L6
  STORE_FAST versionRange
  LOAD_FAST versionRange
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'targetApplication'
  CALL 1
  POP_JUMP_IF_TRUE L4
  LOAD_GLOBAL NULL + add_plugin_item
  LOAD_FAST pluginItems
  LOAD_FAST item
  LOAD_FAST versionRange
  LOAD_FAST app_id
  LOAD_FAST api_ver
  LOAD_FAST app_ver
  KW_NAMES ('app_id', 'api_ver', 'app_ver')
  CALL 6
  POP_TOP
  JUMP_BACKWARD L3
L4:
  LOAD_GLOBAL NULL + get_related_targetApplication
  LOAD_FAST versionRange
  LOAD_FAST app_id
  LOAD_FAST app_ver
  CALL 3
  STORE_FAST targetApplication
  LOAD_FAST targetApplication
  POP_JUMP_IF_NOT_NONE L5
  JUMP_BACKWARD L3
L5:
  LOAD_GLOBAL NULL + add_plugin_item
  LOAD_FAST pluginItems
  LOAD_FAST item
  LOAD_FAST versionRange
  LOAD_FAST targetApplication
  LOAD_FAST app_id
  LOAD_FAST api_ver
  LOAD_FAST app_ver
  KW_NAMES ('app_id', 'api_ver', 'app_ver')
  CALL 7
  POP_TOP
  JUMP_BACKWARD L3
L6:
  END_FOR
  JUMP_BACKWARD L2
L7:
  END_FOR
  RETURN_CONST None
END

def write_plugin_items(xml_tree, records, app_id, api_ver=3, app_ver=None):
    """pass"""
    if not records:
        return
    pluginItems = etree.SubElement(xml_tree, 'pluginItems')
    for item in records:
        for versionRange in item.get('versionRange', []):
            if not versionRange.get('targetApplication'):
                add_plugin_item(pluginItems, item, versionRange, app_id=app_id, api_ver=api_ver, app_ver=app_ver)
            else:
                targetApplication = get_related_targetApplication(versionRange, app_id, app_ver)
                if targetApplication is not None:
                    add_plugin_item(pluginItems, item, versionRange, targetApplication, app_id=app_id, api_ver=api_ver, app_ver=app_ver)


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (3,)
  LOAD_CONST <code write_gfx_items>
  MAKE_FUNCTION defaults
  STORE_NAME write_gfx_items
  RETURN_CONST None
END
CODE write_gfx_items(xml_tree, records, app_id, api_ver)
  DOC 'pass'
  RESUME 0
  LOAD_FAST records
  POP_JUMP_IF_TRUE L1
  RETURN_CONST None
L1:
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST xml_tree
  LOAD_CONST 'gfxItems'
  CALL 2
  STORE_FAST gfxItems
  LOAD_FAST records
  GET_ITER
L2:
  EXTENDED_ARG 1
  FOR_ITER L15
  STORE_FAST item
  LOAD_CONST 'guid'
  LOAD_FAST item
  CONTAINS_OP 1
  COPY 1
  POP_JUMP_IF_TRUE L3
  POP_TOP
  LOAD_FAST item
  LOAD_CONST 'guid'
  BINARY_SUBSCR
  LOAD_FAST app_id
  COMPARE_OP ==
L3:
  STORE_FAST is_record_related
  LOAD_FAST is_record_related
  POP_JUMP_IF_TRUE L4
  JUMP_BACKWARD L2
L4:
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST gfxItems
  LOAD_CONST 'gfxBlacklistEntry'
  LOAD_FAST item
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'blockID'
  LOAD_FAST item
  LOAD_CONST 'id'
  BINARY_SUBSCR
  CALL 2
  KW_NAMES ('blockID',)
  CALL 3
  STORE_FAST entry
  BUILD_LIST 0
  LOAD_CONST ('os', 'vendor', 'feature', 'featureStatus', 'driverVersion', 'driverVersionComparator')
  LIST_EXTEND 1
  STORE_FAST fields
  LOAD_FAST fields
  GET_ITER
L5:
  FOR_ITER L7
  STORE_FAST field
  LOAD_FAST field
  LOAD_FAST item
  CONTAINS_OP 0
  POP_JUMP_IF_TRUE L6
  JUMP_BACKWARD L5
L6:
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST entry
  LOAD_FAST field
  CALL 2
  STORE_FAST node
  LOAD_FAST item
  LOAD_FAST field
  BINARY_SUBSCR
  LOAD_FAST node
  STORE_ATTR text
  JUMP_BACKWARD L5
L7:
  END_FOR
  LOAD_FAST item
  LOAD_CONST 'devices'
  BINARY_SUBSCR
  POP_JUMP_IF_FALSE L10
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST entry
  LOAD_CONST 'devices'
  CALL 2
  STORE_FAST devices
  LOAD_FAST item
  LOAD_CONST 'devices'
  BINARY_SUBSCR
  GET_ITER
L8:
  FOR_ITER L9
  STORE_FAST d
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST devices
  LOAD_CONST 'device'
  CALL 2
  STORE_FAST device
  LOAD_FAST d
  LOAD_FAST device
  STORE_ATTR text
  JUMP_BACKWARD L8
L9:
  END_FOR
L10:
  LOAD_CONST 'versionRange'
  LOAD_FAST item
  CONTAINS_OP 0
  POP_JUMP_IF_TRUE L11
  JUMP_BACKWARD L2
L11:
  LOAD_FAST item
  LOAD_CONST 'versionRange'
  BINARY_SUBSCR
  STORE_FAST version
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST entry
  LOAD_CONST 'versionRange'
  CALL 2
  STORE_FAST versionRange
  LOAD_CONST ('minVersion', 'maxVersion')
  GET_ITER
L12:
  FOR_ITER L14
  STORE_FAST field
  LOAD_FAST version
  LOAD_ATTR NULL|self + get
  LOAD_FAST field
  CALL 1
  STORE_FAST value
  LOAD_FAST value
  POP_JUMP_IF_TRUE L13
  JUMP_BACKWARD L12
L13:
  LOAD_FAST versionRange
  LOAD_ATTR NULL|self + set
  LOAD_FAST field
  LOAD_GLOBAL NULL + str
  LOAD_FAST value
  CALL 1
  CALL 2
  POP_TOP
  JUMP_BACKWARD L12
L14:
  END_FOR
  EXTENDED_ARG 1
  JUMP_BACKWARD L2
L15:
  END_FOR
  RETURN_CONST None
END

def write_gfx_items(xml_tree, records, app_id, api_ver=3):
    """pass"""
    if not records:
        return
    gfxItems = etree.SubElement(xml_tree, 'gfxItems')
    for item in records:
        is_record_related = 'guid' not in item or item['guid'] == app_id
        if is_record_related:
            entry = etree.SubElement(gfxItems, 'gfxBlacklistEntry', blockID=item.get('blockID', item['id']))
            fields = ['os', 'vendor', 'feature', 'featureStatus', 'driverVersion', 'driverVersionComparator']
            for field in fields:
                if field in item:
                    node = etree.SubElement(entry, field)
                    node.text = item[field]
            if item['devices']:
                devices = etree.SubElement(entry, 'devices')
                for d in item['devices']:
                    device = etree.SubElement(devices, 'device')
                    device.text = d
            if 'versionRange' in item:
                version = item['versionRange']
                versionRange = etree.SubElement(entry, 'versionRange')
                for field in ['minVersion', 'maxVersion']:
                    value = version.get(field)
                    if value:
                        versionRange.set(field, str(value))


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (3, None, None)
  LOAD_CONST <code write_cert_items>
  MAKE_FUNCTION defaults
  STORE_NAME write_cert_items
  RETURN_CONST None
END
CODE write_cert_items(xml_tree, records, api_ver, app_id, app_ver)
  DOC 'pass'
  RESUME 0
  LOAD_FAST records
  POP_JUMP_IF_FALSE L1
  LOAD_GLOBAL NULL + should_include_certs
  LOAD_FAST app_id
  LOAD_FAST app_ver
  CALL 2
  POP_JUMP_IF_TRUE L2
L1:
  RETURN_CONST None
L2:
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST xml_tree
  LOAD_CONST 'certItems'
  CALL 2
  STORE_FAST certItems
  LOAD_FAST records
  GET_ITER
L3:
  FOR_ITER L5
  STORE_FAST item
  LOAD_FAST item
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'subject'
  CALL 1
  POP_JUMP_IF_FALSE L4
  LOAD_FAST item
  LOAD_ATTR NULL|self + get
  LOAD_CONST 'pubKeyHash'
  CALL 1
  POP_JUMP_IF_FALSE L4
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST certItems
  LOAD_CONST 'certItem'
  LOAD_FAST item
  LOAD_CONST 'subject'
  BINARY_SUBSCR
  LOAD_FAST item
  LOAD_CONST 'pubKeyHash'
  BINARY_SUBSCR
  KW_NAMES ('subject', 'pubKeyHash')
  CALL 4
  STORE_FAST cert
  JUMP_BACKWARD L3
L4:
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST certItems
  LOAD_CONST 'certItem'
  LOAD_FAST item
  LOAD_CONST 'issuerName'
  BINARY_SUBSCR
  KW_NAMES ('issuerName',)
  CALL 3
  STORE_FAST cert
  LOAD_GLOBAL etree
  LOAD_ATTR NULL|self + SubElement
  LOAD_FAST cert
  LOAD_CONST 'serialNumber'
  CALL 2
  STORE_FAST serialNumber
  LOAD_FAST item
  LOAD_CONST 'serialNumber'
  BINARY_SUBSCR
  LOAD_FAST serialNumber
  STORE_ATTR text
  JUMP_BACKWARD L3
L5:
  END_FOR
  RETURN_CONST None
END

def write_cert_items(xml_tree, records, api_ver=3, app_id=None, app_ver=None):
    """pass"""
    if not records or not should_include_certs(app_id, app_ver):
        return
    certItems = etree.SubElement(xml_tree, 'certItems')
    for item in records:
        if item.get('subject') and item.get('pubKeyHash'):
            cert = etree.SubElement(certItems, 'certItem', subject=item['subject'], pubKeyHash=item['pubKeyHash'])
        else:
            cert = etree.SubElement(certItems, 'certItem', issuerName=item['issuerName'])
            serialNumber = etree.SubElement(cert, 'serialNumber')
            serialNumber.text = item['serialNumber']


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST (True,)
  LOAD_CONST <code label>
  MAKE_FUNCTION defaults
  STORE_NAME label
  RETURN_CONST None
END
CODE label(self, name, color, update)
  DOC 'pass'
  RESUME 0
  LOAD_CONST '%s/labels'
  LOAD_FAST self
  BINARY_OP %
  STORE_FAST url
  LOAD_GLOBAL NULL + dict
  LOAD_FAST name
  LOAD_FAST color
  KW_NAMES ('name', 'color')
  CALL 2
  STORE_FAST data
  LOAD_FAST self
  LOAD_ATTR http
  LOAD_ATTR NULL|self + post
  LOAD_FAST url
  LOAD_FAST data
  LOAD_FAST self
  LOAD_ATTR auth
  LOAD_FAST self
  LOAD_ATTR headers
  KW_NAMES ('json', 'auth', 'headers')
  CALL 4
  STORE_FAST response
  LOAD_FAST response
  LOAD_ATTR status_code
  LOAD_CONST 201
  COMPARE_OP ==
  POP_JUMP_IF_FALSE L1
  RETURN_CONST True
L1:
  LOAD_FAST response
  LOAD_ATTR status_code
  LOAD_CONST 422
  COMPARE_OP ==
  POP_JUMP_IF_FALSE L2
  LOAD_FAST update
  POP_JUMP_IF_FALSE L2
  LOAD_FAST url
  FORMAT_VALUE str
  LOAD_CONST '/'
  LOAD_FAST name
  FORMAT_VALUE str
  BUILD_STRING 3
  STORE_FAST url
  LOAD_FAST self
  LOAD_ATTR http
  LOAD_ATTR NULL|self + patch
  LOAD_FAST url
  LOAD_FAST data
  LOAD_FAST self
  LOAD_ATTR auth
  LOAD_FAST self
  LOAD_ATTR headers
  KW_NAMES ('json', 'auth', 'headers')
  CALL 4
  STORE_FAST response
L2:
  LOAD_FAST response
  LOAD_ATTR NULL|self + raise_for_status
  CALL 0
  POP_TOP
  RETURN_CONST False
END

def label(self, name, color, update=True):
    """pass"""
    url = '%s/labels' % self
    data = dict(name=name, color=color)
    response = self.http.post(url, json=data, auth=self.auth, headers=self.headers)
    if response.status_code == 201:
        return True
    elif response.status_code == 422 and update:
        url = '%s/%s' % (url, name)
        response = self.http.patch(url, json=data, auth=self.auth, headers=self.headers)
    response.raise_for_status()
    return False


Input:
CODE <module>()
  RESUME 0
  LOAD_CONST <code get_interval_timedelta>
  MAKE_FUNCTION 0
  STORE_NAME get_interval_timedelta
  RETURN_CONST None
END
CODE get_interval_timedelta(self)
  DOC 'pass'
  RESUME 0
  LOAD_GLOBAL timezone
  LOAD_ATTR NULL|self + now
  CALL 0
  STORE_FAST now_datetime
  LOAD_GLOBAL NULL + monthrange
  LOAD_FAST now_datetime
  LOAD_ATTR year
  LOAD_FAST now_datetime
  LOAD_ATTR month
  CALL 2
  LOAD_CONST 1
  BINARY_SUBSCR
  STORE_FAST current_month_days
  LOAD_FAST self
  LOAD_ATTR interval
  LOAD_GLOBAL reminders_choices
  LOAD_ATTR INTERVAL_2_WEEKS
  COMPARE_OP ==
  POP_JUMP_IF_FALSE L1
  LOAD_GLOBAL datetime
  LOAD_ATTR NULL|self + timedelta
  LOAD_CONST 14
  KW_NAMES ('days',)
  CALL 1
  STORE_FAST interval_timedelta
  LOAD_FAST interval_timedelta
  RETURN_VALUE
L1:
  LOAD_FAST self
  LOAD_ATTR interval
  LOAD_GLOBAL reminders_choices
  LOAD_ATTR INTERVAL_ONE_MONTH
  COMPARE_OP ==
  POP_JUMP_IF_FALSE L2
  LOAD_GLOBAL datetime
  LOAD_ATTR NULL|self + timedelta
  LOAD_FAST current_month_days
  KW_NAMES ('days',)
  CALL 1
  STORE_FAST interval_timedelta
  LOAD_FAST interval_timedelta
  RETURN_VALUE
L2:
  LOAD_FAST self
  LOAD_ATTR interval
  LOAD_GLOBAL reminders_choices
  LOAD_ATTR INTERVAL_THREE_MONTHS
  COMPARE_OP ==
  POP_JUMP_IF_FALSE L3
  LOAD_FAST now_datetime
  LOAD_GLOBAL NULL + relativedelta
  LOAD_CONST 3
  KW_NAMES ('months',)
  CALL 1
  BINARY_OP +
  STORE_FAST three_months
  LOAD_FAST three_months
  LOAD_FAST now_datetime
  BINARY_OP -
  STORE_FAST interval_timedelta
  LOAD_FAST interval_timedelta
  RETURN_VALUE
L3:
  LOAD_FAST self
  LOAD_ATTR interval
  LOAD_GLOBAL reminders_choices
  LOAD_ATTR INTERVAL_SIX_MONTHS
  COMPARE_OP ==
  POP_JUMP_IF_FALSE L4
  LOAD_FAST now_datetime
  LOAD_GLOBAL NULL + relativedelta
  LOAD_CONST 6
  KW_NAMES ('months',)
  CALL 1
  BINARY_OP +
  STORE_FAST six_months
  LOAD_FAST six_months
  LOAD_FAST now_datetime
  BINARY_OP -
  STORE_FAST interval_timedelta
  LOAD_FAST interval_timedelta
  RETURN_VALUE
L4:
  LOAD_FAST self
  LOAD_ATTR interval
  LOAD_GLOBAL reminders_choices
  LOAD_ATTR INTERVAL_ONE_YEAR
  COMPARE_OP ==
  POP_JUMP_IF_FALSE L5
  LOAD_FAST now_datetime
  LOAD_GLOBAL NULL + relativedelta
  LOAD_CONST 1
  KW_NAMES ('years',)
  CALL 1
  BINARY_OP +
  STORE_FAST one_year
  LOAD_FAST one_year
  LOAD_FAST now_datetime
  BINARY_OP -
  STORE_FAST interval_timedelta
L5:
  LOAD_FAST_CHECK interval_timedelta
  RETURN_VALUE
END

def get_interval_timedelta(self):
    """pass"""
    now_datetime = timezone.now()
    current_month_days = monthrange(now_datetime.year, now_datetime.month)[1]
    if self.interval == reminders_choices.INTERVAL_2_WEEKS:
        interval_timedelta = datetime.timedelta(days=14)
    elif self.interval == reminders_choices.INTERVAL_ONE_MONTH:
        interval_timedelta = datetime.timedelta(days=current_month_days)
    elif self.interval == reminders_choices.INTERVAL_THREE_MONTHS:
        three_months = now_datetime + relativedelta(months=+3)
        interval_timedelta = three_months - now_datetime
    elif self.interval == reminders_choices.INTERVAL_SIX_MONTHS:
        six_months = now_datetime + relativedelta(months=+6)
        interval_timedelta = six_months - now_datetime
    elif self.interval == reminders_choices.INTERVAL_ONE_YEAR:
        one_year = now_datetime + relativedelta(years=+1)
        interval_timedelta = one_year - now_datetime
    return interval_timedelta