parameters: (self, dt, is_dst=False)
return_statement: return dt.replace(tzinfo=self)
docstring: Convert naive time to local time
docstring_summary: Convert naive time to local time
docstring_tokens: Convert naive time to local time
function: def localize(self, dt, is_dst=False):
          '''Convert naive time to local time'''
          if dt.tzinfo is not None:
              raise ValueError('Not naive datetime (tzinfo is already set)')
          return dt.replace(tzinfo=self)
function_tokens: def localize ( self , dt , is_dst = False ) : if dt . tzinfo is not None : raise ValueError ( 'Not naive datetime (tzinfo is already set)' ) return dt . replace ( tzinfo = self )