code: def ply_ascii(elements, file_obj):
      
  
      # get the file contents as a string
      text = str(file_obj.read().decode('utf-8'))
  
      # split by newlines
      lines = str.splitlines(text)
  
      # get each line as an array split by whitespace
      array = np.array([np.fromstring(i, sep=' ')
                        for i in lines])
  
      # store the line position in the file
      position = 0
  
      # loop through data we need
      for key, values in elements.items():
          # will store (start, end) column index of data
          columns = collections.deque()
          # will store the total number of rows
          rows = 0
  
          for name, dtype in values['properties'].items():
              if '$LIST' in dtype:
                  # if an element contains a list property handle it here
  
                  row = array[position]
                  list_count = int(row[rows])
  
                  # ignore the count and take the data
                  columns.append([rows + 1,
                                  rows + 1 + list_count])
                  rows += list_count + 1
                  # change the datatype to just the dtype for data
  
                  values['properties'][name] = dtype.split('($LIST,)')[-1]
              else:
                  # a single column data field
                  columns.append([rows, rows + 1])
                  rows += 1
  
          # get the lines as a 2D numpy array
          data = np.vstack(array[position:position + values['length']])
          # offset position in file
          position += values['length']
  
          # store columns we care about by name and convert to data type
          elements[key]['data'] = {n: data[:, c[0]:c[1]].astype(dt)
                                   for n, dt, c in zip(
              values['properties'].keys(),    # field name
              values['properties'].values(),  # data type of field
              columns)}
docs: Load data from an ASCII PLY file into an existing elements data structure.
  
      Parameters
      ------------
      elements: OrderedDict object, populated from the file header.
                object will be modified to add data by this function.
  
      file_obj: open file object, with current position at the start
                of the data section (past the header)