<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bins_range(self, axis=0, overflow=False):
 """ Return a range of bin indices for iterating along an axis Parameters axis : int, optional (default=1) The axis (0, 1 or 2). overflow : bool, optional (default=False) If True then include the underflow and overflow bins otherwise only include the visible bins. Returns ------- an range object of bin indices """

        nbins = self.nbins(axis=axis, overflow=False)
        if overflow:
            start = 0
            end_offset = 2
        else:
            start = 1
            end_offset = 1
        return range(start, nbins + end_offset)