parameters: (entry)
return_statement: return run_number, period
docstring: Gets the run number and the period from a csv data entry.
          @param entry: a data entry, e.g. 5512 or 5512p7
          @return: the run number, the period selection and the corresponding key word
docstring_summary: Gets the run number and the period from a csv data entry.
docstring_tokens: Gets the run number and the period from a csv data entry .
function: def _get_run_number_and_period(entry):
          """
          Gets the run number and the period from a csv data entry.
          @param entry: a data entry, e.g. 5512 or 5512p7
          @return: the run number, the period selection and the corresponding key word
          """
          # Slice off period if it exists. If it does not exist, then the period is ALL_PERIODS
          period_pattern = "[p,P][0-9]$"
  
          has_period = re.search(period_pattern, entry)
  
          period = ALL_PERIODS
          run_number = entry
          if has_period:
              run_number = re.sub(period_pattern, "", entry)
              period_partial = re.sub(run_number, "", entry)
              period = re.sub("[p,P]", "", period_partial)
              period = int(period)
  
          return run_number, period
function_tokens: def _get_run_number_and_period ( entry ) : # Slice off period if it exists. If it does not exist, then the period is ALL_PERIODS period_pattern = "[p,P][0-9]$" has_period = re . search ( period_pattern , entry ) period = ALL_PERIODS run_number = entry if has_period : run_number = re . sub ( period_pattern , "" , entry ) period_partial = re . sub ( run_number , "" , entry ) period = re . sub ( "[p,P]" , "" , period_partial ) period = int ( period ) return run_number , period