code: def get_leading_spaces(data):
      
      spaces = ''
      m = re.match(r'^(\s*)', data)
      if m:
          spaces = m.group(1)
      return spaces
docs: Get the leading space of a string if it is not empty
  
      :type data: str