code: def check_static_member_vars(class_, fpath=None, only_init=True):
      import utool as ut
      if isinstance(class_, six.string_types):
          classname = class_
          if fpath is None:
              raise Exception('must specify fpath')
      else:
          if not isinstance(class_, type):
              class_instance = class_
              class_ = class_instance.__class__
          classname = class_.__name__
          if fpath is None:
              module = ut.get_module_from_class(class_)
              fpath = ut.get_modpath(module)
      sourcecode = ut.readfrom(fpath)
      import redbaron
      baron = redbaron.RedBaron(sourcecode)
      for node in baron:
          if node.type == 'class' and node.name == classname:
              classnode = node
              break
      def find_parent_method(node):
          par = node.parent_find('def')
          if par is not None and par.parent is not None:
              if par.parent.type == 'class':
                  return par
              else:
                  return find_parent_method(par)
      class_methods = []
      for node in classnode:
          if node.type == 'def':
              if only_init:
                  if node.name == '__init__':
                      class_methods.append(node)
              else:
                  class_methods.append(node)
      class_vars = []
      self_vars = []
      for method_node in class_methods:
          self_var = method_node.arguments[0].dumps()
          self_vars.append(self_var)
          for assign in method_node.find_all('assignment'):
              if assign.target.dumps().startswith(self_var + '.'):
                  class_vars.append(assign.target.value[1].dumps())
      static_attrs = ut.unique(class_vars)
      return static_attrs
      if False:
          self_var = self_vars[0]
          complex_cases = []
          simple_cases = []
          all_self_ref = classnode.find_all(
              'name_', value=re.compile('.*' + self_var + '\\.*'))
          for x in all_self_ref:
              if x.parent.type == 'def_argument':
                  continue
              if x.parent.type == 'atomtrailers':
                  atom = x.parent
                  if ut.depth(atom.fst()) <= 3:
                      simple_cases.append(atom)
                  else:
                      complex_cases.append(atom)
          accessed_attrs = []
          for x in simple_cases:
              if x.value[0].dumps() == self_var:
                  attr = x.value[1].dumps()
                  accessed_attrs.append(attr)
          accessed_attrs = ut.unique(accessed_attrs)
          ut.setdiff(accessed_attrs, class_vars)