parameters: (unit)
docstring: Check unit type and value.
docstring_summary: Check unit type and value.
docstring_tokens: Check unit type and value .
function: def _check_unit(unit):
          """Check unit type and value."""
          check_value_type('unit', unit, str)
          if unit not in ["step", "epoch"]:
              raise ValueError(f'Unit should be step or epoch, but got the: {unit}')
function_tokens: def _check_unit ( unit ) : check_value_type ( 'unit' , unit , str ) if unit not in [ "step" , "epoch" ] : raise ValueError ( f'Unit should be step or epoch, but got the: {unit}' )