def create_timestep_range(timesteps):
    """
    create a range of time steps
    if an integer time step is given, create a simple range iterator
    otherwise, assing the time steps to integer bins so that each bin
    contains a list of time steps belonging to that bin
    """
    if isinstance(timesteps, int):
        timesteps = range(timesteps + 1)
        timestep_type = "int"
        original_timesteps = None
    else:
        original_timesteps = [0] + list(timesteps)
        timesteps = binned_timesteps(original_timesteps)
        timestep_type = "list"
    return timesteps, original_timesteps, timestep_type
create a range of time steps
if an integer time step is given, create a simple range iterator
otherwise, assing the time steps to integer bins so that each bin
contains a list of time steps belonging to that bin
pysteps/nowcasts/utils.py