def METHOD_NAME(self):
    """Execute command."""
    for index in range(0, UpdateThread.calls):
        pid = random.choice(UpdateThread.pids)
        # Create lock if not exists
        if not UpdateThread.locks.get(pid):
            UpdateThread.locks[pid] = threading.Lock()
        # Lock for PID
        UpdateThread.locks[pid].acquire()
        url = f'https://{UpdateThread.host}/api/{UpdateThread.index}/{pid}'
        try:
            response = requests.get(url,
                                    verify=False,
                                    headers=self.headers)
            if response.status_code != 200:
                raise Exception(f'GET error {response.status_code}')
            def remove_calculated_properties(data):
                """Remove calculated properties to avoid a 400 error.
                :param dict data: Data to process.
                """
                for key in list(data):
                    if key.startswith('_'):
                        del data[key]
                    else:
                        if isinstance(data[key], list):
                            for item in data[key]:
                                if isinstance(item, dict):
                                    remove_calculated_properties(item)
                        if isinstance(data[key], dict):
                            remove_calculated_properties(data[key])
            data = response.json()
            remove_calculated_properties(data)
            response = requests.put(url,
                                    verify=False,
                                    headers=self.headers,
                                    data=json.dumps(data['metadata']))
            if response.status_code != 200:
                raise Exception(f'PUT error {response.status_code}')
            print(
                f'Updated {url} in execution {index+1} of thread ' \
                f'{(self.thread_number+1)}: Status {response.status_code}, ' \
                f'Time {response.elapsed.total_seconds()}'
            )
        except Exception as exception:
            print(
                f'Error during processing of {url} in execution {index} ' \
                f'of thread {(self.thread_number+1)}: {str(exception)}'
            )
        # Unlock
        UpdateThread.locks[pid].release()