import json


def read_spatial_params(body_part_json):
  """
  Reads from a JSON formatted file the body spatial parameters.

  Args:
      body_part_json (json): a JSON formatted file specifying a
              list of dicts, where each dict consists of a body anchor and
              parts, and displacement is the sum of displacements from
              each anchor to each part

  Returns:
      a list of dicts: each dict consists of an anchor and a list of
      parts, where the displacement from the anchor to each part would
      be compueted and summed
  """
  with open(body_part_json) as data_file:
    spatial_params_list = json.load(data_file)['spatial']
    return spatial_params_list