code: def get_float(self, input_string):
          
  
          if input_string == '--training_fraction':
  
              # was the flag set?
              try:
                  index = self.args.index(input_string) + 1
              except ValueError:
                  # it wasn't, it's optional, so return the appropriate default
                  return None
  
              # the flag was set, so check if a value was set, otherwise exit
              try:
                  if self.args[index] in self.flags:
                      print("\n {flag} was set but a value was not specified".format(flag=input_string))
                      print_short_help()
                      sys.exit(1)
              except IndexError:
                  print("\n {flag} was set but a value was not specified".format(flag=input_string))
                  print_short_help()
                  sys.exit(1)
  
              # a value was set, so check if its the correct type
              try:
                  value = float(self.args[index])
              except ValueError:
                  print("\n {flag} must be a float less than or equal to 1, e.g. 0.4".format(flag=input_string))
                  print_short_help()
                  sys.exit(1)
              if value > 1.0 or value < 0:
                  print("\n {flag} must be a float less than or equal to 1, e.g. 0.4".format(flag=input_string))
                  print_short_help()
                  sys.exit(1)
  
              # everything checks out, so return the appropriate value
              return value
docs: Return float type user input