<human>:  codes to count average of length of words in a given text using.
<bot>: Here is a Python function to code to count average length of words in a given text using the Python function

import string

def _count_average_length_of_words(text):
  """Count average of length of words in a given text using ``text``."""
  words = text.split()
  total_length = 0
  for word in words:
    total_length += len(word)
  return total_length / len(words)

# Enter the text
text = "This is a test"

# Calling the function
print((_count_average_length_of_words(text)))

#Example Output
# 2.75

#Remember to inspect code for bugs.