class_docstr: Graph super class containing generic common functions
class_docstr_tok: ["Graph","super","class","containing","generic","common","functions"]
code: def _compute_x_labels_major(self):
      if self.x_labels_major_every:
          self._x_labels_major = [
              self._x_labels[i][0]
              for i in range(
                  0, len(self._x_labels), self.x_labels_major_every
              )
          ]
  
      elif self.x_labels_major_count:
          label_count = len(self._x_labels)
          major_count = self.x_labels_major_count
          if major_count >= label_count:
              self._x_labels_major = [
                  label[0] for label in self._x_labels
              ]
  
          else:
              self._x_labels_major = [
                  self._x_labels[
                      int(i * (label_count - 1) / (major_count - 1))
                  ][0]
                  for i in range(major_count)
              ]
      else:
          self._x_labels_major = (
              self.x_labels_major
              and list(
                  map(
                      self._x_label_format_if_value, self.x_labels_major
                  )
              )
              or []
          )
  
imports: from math import ceil, cos, sin, sqrt
  from pygal import stats
  from pygal._compat import is_list_like
  from pygal.graph.public import PublicApi
  from pygal.interpolate import INTERPOLATIONS
  from pygal.util import cached_property, compute_scale, cut, decorate, filter_kwargs, get_text_box, get_texts_box, majorize, rad, reverse_text_len, split_title, truncate
  from pygal.view import LogView, ReverseView, View, XYLogView
label_desc: Use image node_id 41 for calling the Graph obj's underlying member method code with example usage: obj._compute_x_labels_major() without return types