def METHOD_NAME(self, data, x_range, height, width, entities):
    data = self.data or data
    palette = Category10_6
    markers = ['circle', 'triangle', 'diamond', 'square']
    if self.shift_palette:
        shift_palette = self.shift_palette % 6
        palette = palette[shift_palette:] + palette[:shift_palette]
        shift_markers = self.shift_palette % len(markers)
        markers = markers[shift_markers:] + markers[:shift_markers]
    markers = markers * int(len(data.entities) / len(markers) + 1)
    if not data:
        raise TypeError('missing data for timeline "{}"'.format(self.name))
    METHOD_NAME = None
    if data.df[self.name].dtype == 'object':
        values = data.df[self.name].unique()
        values.sort()
        METHOD_NAME = figure(title=self.label, width=width, height=height, x_axis_type="datetime", x_range=x_range, y_range=values)
    else:
        METHOD_NAME = figure(title=self.label, width=width, height=height, x_axis_type="datetime", x_range=x_range)
    source = data.get_or_create_source()
    METHOD_NAME.scatter(
        x=data.time,
        y=self.name,
        source=source,
        size=10,
        legend_group=data.entity,
        marker=factor_mark(data.entity, markers, entities),
        color=factor_cmap(data.entity, palette, entities),
    )
    METHOD_NAME.add_tools(HoverTool(
         tooltips=[
            ('entity', f'(@{data.time}{{%F}}, @{data.entity}, @{self.name})')
        ],
        formatters={
            '@{}'.format(data.time): 'datetime', # use 'datetime' formatter for 'time' field
        },
        # Would like to use `vline` to show all intersected points.
        # However, it has problems with the vertical segments (and other things) and ends
        # up showing *many* hovers. Leaving off for now.
        #
        # https://github.com/bokeh/bokeh/issues/9087 - May be able to fix once this issue
        # is addressed, by providing a custom "filter".
        mode = "mouse"))
    METHOD_NAME.legend.location = self.legend_location
    if self.continuous:
        last_time = data.prev(data.time)
        last_value = data.prev(self.name)
        # Draw horizontal lines between the last change time and the next change time.
        METHOD_NAME.add_glyph(source, Segment(
            x0=last_time, x1=data.time, y0=last_value, y1=last_value,
            line_color=factor_cmap(data.entity, palette, entities)))
        # Draw vertical dashed lines between last value and the new value (at new time).
        METHOD_NAME.add_glyph(source, Segment(
            x0=data.time, x1=data.time, y0=last_value, y1=self.name,
            line_dash='dotted',
            line_color=factor_cmap(data.entity, palette, entities)))
        # Print the arrows for continuity.
        ends = data.last_value(self.name)
        for index, row in ends.iterrows():
            index = entities.searchsorted(row['entity'])
            color = palette[index % len(palette)]
            METHOD_NAME.add_layout(Arrow(
                x_start=row['time'], y_start=row['value'], x_end=x_range.end, y_end=row['value'],
                end=NormalHead(line_color=color, fill_color=color, size=5),
                line_color=color
            ))
    return METHOD_NAME